Salome HOME
Open transaction before setCurrentFeatuire if it is not opened
[modules/shaper.git] / src / ModuleBase / ModuleBase_ViewerPrs.h
index 3a189d37bda920f965a7136f4972715a7c5b9b3d..ebc274981b54077b325eb8bf2da61d533b97140d 100644 (file)
@@ -17,7 +17,7 @@
 #include <ModelAPI_Result.h>
 
 /**\class ModuleBase_ViewerPrs
- * \ingroup Module base
+ * \ingroup GUI
  * \brief Presentation. Provides container to have feature, shape and/or selection owner.
  */
 class ModuleBase_ViewerPrs
@@ -47,7 +47,7 @@ class ModuleBase_ViewerPrs
 
   /// Sets the object.
   /// \param theResult an object instance
-  void setFeature(ObjectPtr theResult)
+  void setObject(ObjectPtr theResult)
   {
     myResult = theResult;
   }
@@ -100,6 +100,14 @@ class ModuleBase_ViewerPrs
     return myInteractive;
   }
 
+  /// Returns true if all presentation fields are empty
+  /// \return boolean value
+  bool isEmpty() const
+  {
+    return myShape.IsNull() &&
+           myOwner.IsNull() && !myResult.get();
+  }
+
   /// Returns True if the current object is equal to the given one
   /// \param thePrs an object to compare
   bool operator==(const ModuleBase_ViewerPrs& thePrs)