Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationFeature.cpp
index 04edf79576b5a8e6df3fc796d0b954c6b096f3a9..a1346ebc870ad2d6cf5279e2906c8d998ae77c9e 100755 (executable)
@@ -352,13 +352,14 @@ bool ModuleBase_OperationFeature::commit()
 
     myFeature->setStable(true);
 
-    SessionPtr aMgr = ModelAPI_Session::get();
-    /// Set current feature and remeber old current feature
-
     commitOperation();
-    aMgr->finishOperation();
 
     stopOperation();
+
+    SessionPtr aMgr = ModelAPI_Session::get();
+    aMgr->finishOperation();
+    // Finish operation has to be before stopped because stopped caused update of Object browser
+    // If it will be done before of cleaning of obsolete objects it will cause crash
     emit stopped();
     emit committed();