Salome HOME
refs #639: the button to regenerate colors
[modules/hydro.git] / src / HYDROData / HYDROData_Object.cxx
index a2aeb4798d98797c346e9fb814e3d730b1f9f9e8..25b9e2625187447f1a6a2ad224eb99c530b2da13 100644 (file)
@@ -28,6 +28,7 @@
 #include <TNaming_NamedShape.hxx>
 
 #include <TopoDS_Shape.hxx>
+#include <TDataStd_Integer.hxx>
 
 #include <QColor>
 
@@ -376,3 +377,20 @@ void HYDROData_Object::removeShape3D()
     aLabel.ForgetAllAttributes();
 }
 
+bool HYDROData_Object::IsSubmersible() const
+{
+  Handle(TDataStd_Integer) aSubMersibleAttr;
+
+  bool isSubmersible = true; //default
+  if( myLab.FindAttribute(TDataStd_Integer::GetID(), aSubMersibleAttr ) )
+  {
+    int aValue = aSubMersibleAttr->Get();
+    isSubmersible = ( aValue != 0 );
+  }
+  return isSubmersible;
+}
+
+void HYDROData_Object::SetIsSubmersible( bool isSubmersible ) const
+{
+  TDataStd_Integer::Set( myLab, isSubmersible ? 1 : 0 );
+}