mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-19 13:31:06 -04:00
!538 【代码同步】修复RemoveChild异常的问题
Merge pull request !538 from 郝烁/cherry-pick-1650873755
This commit is contained in:
@@ -1746,11 +1746,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