mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-19 13:31:06 -04:00
Description: fix bug in func RemoveChild
IssueNo: https://gitee.com/openharmony/ace_engine_lite/issues/I54FS6 Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: lancer <haoshuo@huawei.com>
This commit is contained in:
@@ -1748,11 +1748,7 @@ void Component::RemoveChild(Component *childNode)
|
||||
return;
|
||||
}
|
||||
|
||||
// the head itself is the last one
|
||||
if (temp == childHead_) {
|
||||
childHead_ = nullptr;
|
||||
}
|
||||
temp->SetNextSibling(nullptr);
|
||||
temp->SetNextSibling(childNode->GetNextSibling());
|
||||
childNode->SetNextSibling(nullptr);
|
||||
childNode->SetParent(nullptr);
|
||||
parentView->Remove(childNativeView);
|
||||
|
||||
@@ -184,17 +184,17 @@ public:
|
||||
virtual void LayoutChildren() {}
|
||||
static void BuildViewTree(Component *currComponent, Component *parent, ConstrainedParameter &parentParameter);
|
||||
|
||||
const Component *GetParent() const
|
||||
Component *GetParent() const
|
||||
{
|
||||
return parent_;
|
||||
}
|
||||
|
||||
const Component *GetChildHead() const
|
||||
Component *GetChildHead() const
|
||||
{
|
||||
return childHead_;
|
||||
}
|
||||
|
||||
const Component *GetNextSibling() const
|
||||
Component *GetNextSibling() const
|
||||
{
|
||||
return nextSibling_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user