ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module());
operationMgr()->startOperation(anOpAction);
+ // WORKAROUND, should be done before each object remove, if it presents in XGUI_DataModel tree
// It is necessary to clear selection in order to avoid selection changed event during
// deletion and negative consequences connected with processing of already deleted items
mySelector->clearSelection();
ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module());
operationMgr()->startOperation(anOpAction);
+ // WORKAROUND, should be done before each object remove, if it presents in XGUI_DataModel tree
+ // It is necessary to clear selection in order to avoid selection changed event during
+ // deletion and negative consequences connected with processing of already deleted items
+ mySelector->clearSelection();
+
std::set<FeaturePtr> anIgnoredFeatures;
if (removeFeatures(anUnusedObjects, anIgnoredFeatures, anActionId)) {
operationMgr()->commitOperation();