update src/gui/view/viewgroup.cc.

Fix removeView

Signed-off-by: 侯歌 <hou731080@163.com>
This commit is contained in:
侯歌 2023-07-28 09:41:44 +00:00 committed by Gitee
parent 5298fcdff1
commit 21b5ea0e11
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -633,7 +633,7 @@ void ViewGroup::detachViewsFromParent(int start, int count){
} }
void ViewGroup::removeFromArray(int index){ void ViewGroup::removeFromArray(int index){
if (isViewTransitioning(mChildren[index])){ if (!isViewTransitioning(mChildren[index])){
mChildren[index]->mParent = nullptr; mChildren[index]->mParent = nullptr;
} }
if (index>=0&&index<mChildren.size()) { if (index>=0&&index<mChildren.size()) {