Salome HOME
patch for install error on Linux
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 133873a9189fd2aa1e3dcabcf38361f86d46e435..ac85dfbf182df46ad22e4ca92d738c422f46c9d7 100644 (file)
@@ -424,10 +424,11 @@ void HYDROGUI_Shape::setFace( const TopoDS_Face& theFace,
 
 void HYDROGUI_Shape::setShape( const TopoDS_Shape& theShape,
                                const bool          theToDisplay,
-                               const bool          theIsUpdateViewer )
+                               const bool          theIsUpdateViewer,
+                               const int           theDisplayMode )
 {
   myTopoShape = theShape;
-  myDisplayMode = AIS_Shaded;
+  myDisplayMode = theDisplayMode;
 
   buildShape();
   updateShape( theToDisplay, theIsUpdateViewer );
@@ -506,7 +507,7 @@ Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const
 void HYDROGUI_Shape::buildShape()
 {
   // Erase previously created shape
-  erase();
+  erase(false);
 
   myShape = createShape();
   if( myShape.IsNull() )
@@ -561,7 +562,7 @@ void HYDROGUI_Shape::updateShape( const bool theToDisplay,
   const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes();
   if ( !anAttributes.IsNull() )
   {
-    if ( myDisplayMode == AIS_Shaded )
+    if ( myDisplayMode == AIS_Shaded && myFillingColor.isValid() )
     {
       Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ), 
                                     getQuantityColorVal( myFillingColor.green() ),