Salome HOME
Merge remote-tracking branch 'origin/BR_LAND_COVER' into BR_v14_rc
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 113d9724d599f522007674579110d2eb17abf1ce..4d015a5c52035044665c62b4f321b1088ce480fe 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <HYDROGUI_Shape.h>
 #include <HYDROGUI_Tool.h>
+#include <HYDROGUI_Polyline.h>
+
 #include <HYDROData_Channel.h>
 #include <HYDROData_Document.h>
 #include <HYDROData_DummyObject3D.h>
@@ -29,7 +31,7 @@
 #include <HYDROData_ShapesGroup.h>
 #include <HYDROData_Stream.h>
 #include <HYDROData_Zone.h>
-#include <HYDROGUI_Polyline.h>
+#include <HYDROData_LandCover.h>
 
 #include <AIS_Shape.hxx>
 #include <BRep_Builder.hxx>
@@ -298,6 +300,22 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
 
       setShape( aCompound, false, false );  
     }
+    else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_LandCover) ) )
+    {
+      Handle(HYDROData_LandCover) aLandCoverObj =
+        Handle(HYDROData_LandCover)::DownCast( myObject );
+
+      TopoDS_Shape aLandCoverShape = aLandCoverObj->GetShape();
+      if ( !aLandCoverShape.IsNull() ) {
+        setShape( aLandCoverShape, false, false );
+      }
+
+      QColor aFillingColor = aLandCoverObj->GetFillingColor();
+      QColor aBorderColor = aLandCoverObj->GetBorderColor();
+
+      setFillingColor( aFillingColor, false, false );
+      setBorderColor( aBorderColor, false, false );
+    }
   }
  
   if ( myShape.IsNull() || !isVisible() )