]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1343. Improvement of Extrusion and Revolution operations: Bug correction:...
authornds <nds@opencascade.com>
Mon, 4 Apr 2016 08:06:32 +0000 (11:06 +0300)
committernds <nds@opencascade.com>
Mon, 4 Apr 2016 08:06:32 +0000 (11:06 +0300)
src/XGUI/XGUI_Workshop.cpp

index 73894bc4b4878c30045cd16f82f814ee7ebeb333..3ed60a9678a31c5bb08dae2e4fb52df5c09e8c83 100755 (executable)
@@ -1202,6 +1202,7 @@ void XGUI_Workshop::deleteObjects()
     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();
@@ -1296,6 +1297,11 @@ void XGUI_Workshop::cleanHistory()
     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();