Salome HOME
Merge branch 'BR_MULTI_BATHS' into HEAD
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 133873a9189fd2aa1e3dcabcf38361f86d46e435..5b73a7ad9778c00897f7352041966d7b131450b5 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 );
@@ -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() ),