Salome HOME
Make same planes cannot be used twice in partition tool
[modules/shaper.git] / src / XGUI / XGUI_Displayer.h
index 5ad16e6bcc00bcbca8be10123dc301481f67ff87..dd221d7bf9cbb9b9398e501f31fa1858270c48e6 100644 (file)
@@ -137,12 +137,14 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   void removeFilters();
 
   /// Sets a flag to the displayer whether the internal viewer can be updated by 
-  /// the updateViewer method call. If it is not enabled, this method do nothing
+  /// the updateViewer method call. If it is not enabled, this method do nothing.
+  /// This state maintain recurse, if the update is blocked twice or three times, the
+  /// viewer will not be updated until it is unblocked necessary times(twice or three in the example).
   /// \param isEnabled a boolean value
   bool enableUpdateViewer(const bool isEnabled);
 
-  /// Returns myEnableUpdateViewer flag
-  bool isUpdateEnabled() const { return myEnableUpdateViewer; }
+  /// Returns true if the viewer update is not blocked
+  bool isUpdateEnabled() const;
 
   /// Updates the viewer
   void updateViewer() const;
@@ -245,6 +247,13 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   /// \param theShapeType a shape type from TopAbs_ShapeEnum
   static int getSelectionMode(int theShapeType);
 
+  /// Return true if the object is visible. If the object is feature, it returns true
+  /// if all results of the feature are shown
+  /// \param theDisplayer a displayer
+  /// \param theObject an object
+  /// \return a boolean value
+  static bool isVisible(XGUI_Displayer* theDislayer, const ObjectPtr& theObject);
+
 signals:
   /// Signal on object display
   /// \param theObject a data object
@@ -327,8 +336,8 @@ private:
   /// Selection modes installed for external objects in local context
   QIntList myActiveSelectionModes;
 
-  /// the enable update viewer flag
-  bool myEnableUpdateViewer; 
+  /// Number of blocking of the viewer update. The viewer is updated only if it equals zero
+  int myViewerBlockedRecursiveCount;
 
   // Flag: use trihedgon for selection or not
   bool myIsTrihedronActive;