Salome HOME
Fix for creation in GUI and unit-test for the issue #2681
[modules/shaper.git] / src / Model / Model_Update.h
index 59485c65807a5167468e452d424c5c536dbabc60..9ca9045450b8b16ae19f63833e4b8038ee925017 100644 (file)
@@ -14,7 +14,8 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
 
 #ifndef Model_Update_H_
@@ -55,13 +56,16 @@ class Model_Update : public Events_Listener
   bool myIsFinish;
   /// try if processing is currently performed
   bool myIsProcessed;
-  /// set that contains features that must be executed only on finish of the operation
-  std::set<std::shared_ptr<ModelAPI_Feature> > myProcessOnFinish;
+  /// map that contains features that must be executed only on finish of the operation
+  /// the value in map is the set of reasons
+  std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
+    myProcessOnFinish;
   /// to avoid infinitive cycling: feature -> count of the processing periods during this update
   std::map<std::shared_ptr<ModelAPI_Feature>, int > myProcessed;
-  /// if preview in hte property panel is blocked and
-  /// any update is postponed until the end of operation
+  /// if preview in the property panel is blocked any update is postponed until end of operation
   bool myIsPreviewBlocked;
+  /// disables any update if it is true, even on start/finish operation, undo, etc.
+  bool myUpdateBlocked;
 
  public:
   /// Is called only once, on startup of the application
@@ -88,7 +92,7 @@ protected:
 
   /// Sends the redisplay events for feature and results, updates the updated status
   void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature,
-    const ModelAPI_ExecState theState);
+    const ModelAPI_ExecState theState, bool theUpdateState = true);
 
   /// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
   //! \param theFlushRedisplay a boolean value if the redisplay signal should be flushed