aObj = subObject(aId);
if (aNode->object() != aObj) {
myChildren.removeAll(aNode);
- aResult.removeAll(aNode);
delete aNode;
isDeleted = true;
}
aToSort |= ((aIndex != -1) && (aId != aIndex));
if (aIndex == -1) {
myChildren.removeAll(aNode);
- aResult.removeAll(aNode);
delete aNode;
aRemoved = true;
}
aToSort |= ((aIndex != -1) && (aId != (aIndex + aNb)));
if (aIndex == -1) {
myChildren.removeAll(aNode);
- aResult.removeAll(aNode);
delete aNode;
aRemoved = true;
continue;
if ((aFirst + aId) < aNbOfFeatures) {
if (aNode->object() != aDoc->object(ModelAPI_Feature::group(), aFirst + aId)) {
myChildren.removeAll(aNode);
- aResult.removeAll(aNode);
delete aNode;
aRemoved = true;
continue;
for (aIt = aMsgGroups.cbegin(); aIt != aMsgGroups.cend(); aIt++) {
aList.append(myRoot->objectsDeleted(aIt->first, aIt->second.c_str()));
}
+ // Remove obsolete nodes
+ QTreeNodesList aRemaining;
foreach(ModuleBase_ITreeNode* aNode, aList) {
+ if (myRoot->hasSubNode(aNode))
+ aRemaining.append(aNode);
+ }
+ // Update remaining nodes
+ foreach(ModuleBase_ITreeNode* aNode, aRemaining) {
if (aNode->parent())
aNode->parent()->update();
}