Salome HOME
refs #525: autocolor of zones in a calculation case.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 4d20f3fdee5b16ca403cd8e696885f70313527ff..08900fbe1f320597af4ecc652aa135732ea981e2 100644 (file)
@@ -225,26 +225,8 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
       }
       else
       {
-        // Generate the filling color for zone
-        QStringList aGeomObjectsNames;
-
-        HYDROData_SequenceOfObjects aRefObjects = aZone->GetGeometryObjects();
-        HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
-        for ( ; anIter.More(); anIter.Next() )
-        {
-          Handle(HYDROData_Object) aRefbject = 
-            Handle(HYDROData_Object)::DownCast( anIter.Value() );
-          if ( aRefbject.IsNull() )
-            continue;
-
-          QString aRefObjectName = aRefbject->GetName();
-          if ( aRefObjectName.isEmpty() )
-            continue;
-
-          aGeomObjectsNames.append( aRefObjectName );
-        }
-
-        setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
+               // Set the filling color for zone
+               setFillingColor( aZone->GetColor(HYDROData_ImmersibleZone::DefaultFillingColor()) );
       }
     }
     else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Profile) ) )
@@ -666,3 +648,8 @@ void HYDROGUI_Shape::colorShapeBorder( const QColor& theColor )
     }
   }
 }
+
+void HYDROGUI_Shape::setDisplayMode( int theDisplayMode )
+{
+  myDisplayMode = theDisplayMode;
+}