Fix removeChild

This commit is contained in:
Maxime Gimeno 2016-03-09 14:43:11 +01:00
parent 21f5c82990
commit 111f3b666b
1 changed files with 7 additions and 3 deletions

View File

@ -141,9 +141,14 @@ public :
//!@see getChildren @see addChild
void removeChild( Scene_item* item)
{
if(isChildLocked(item))
return;
if(isChildLocked(item))
return;
update_group_number(item,0);
item->has_group=0;
Scene_group_item* group =
qobject_cast<Scene_group_item*>(item);
if(group)
resetHasGroup(group);
children.removeOne(item);
}
//!Moves a child up in the list.
@ -164,7 +169,6 @@ protected:
//!Contains a reference to all the children of this group.
QList<Scene_item*> children;
}; //end of class Scene_group_item
}