]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_OperationFeature.cpp
Salome HOME
Merge branch 'BR_ADVANCED_CURRENT_FEATURE_MANAGEMENT' of salome:modules/shaper into...
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationFeature.cpp
index 647455f46bed1265f2010644957ae102a3ee6a4e..97388529154b9daeb80fc0da22bc1e3d7e1b9b62 100755 (executable)
@@ -79,6 +79,9 @@ void ModuleBase_OperationFeature::startOperation()
   if (!aFeature.get() || !isEditOperation())
     return;
 
+  if (aFeature.get() && isEditOperation())
+    aFeature->setStable(false);
+
   myVisualizedObjects.clear();
   // store hidden result features
   std::list<ResultPtr> aResults = aFeature->results();
@@ -115,7 +118,6 @@ void ModuleBase_OperationFeature::stopOperation()
   if (myVisualizedObjects.find(aFeature) != myVisualizedObjects.end()) {
     aFeature->setDisplayed(false);
   }
-  aFeature->setStable(true);
   if (myVisualizedObjects.size() > 0)
     Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
 }
@@ -148,7 +150,6 @@ FeaturePtr ModuleBase_OperationFeature::createFeature(const bool theFlushMessage
 void ModuleBase_OperationFeature::setFeature(FeaturePtr theFeature)
 {
   myFeature = theFeature;
-  myFeature->setStable(false);
   myIsEditing = true;
 }
 
@@ -196,7 +197,7 @@ void ModuleBase_OperationFeature::start()
       return;
     }
   }
-  startOperation();
+  //Already called startOperation();
   emit started();
 
 }
@@ -220,6 +221,8 @@ void ModuleBase_OperationFeature::abort()
   if (aPropertyPanel)
     aPropertyPanel->cleanContent();
 
+  myFeature->setStable(true);
+
   abortOperation();
   stopOperation();
 
@@ -247,6 +250,8 @@ bool ModuleBase_OperationFeature::commit()
     ModuleBase_IPropertyPanel* aPropertyPanel = propertyPanel();
     if (aPropertyPanel)
       aPropertyPanel->cleanContent();
+    
+    myFeature->setStable(true);
 
     SessionPtr aMgr = ModelAPI_Session::get();
     /// Set current feature and remeber old current feature