]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
"0021391: EDF 1630 GEOM: Specific color when editing a group" issue: small fix associ...
authorana <ana@opencascade.com>
Wed, 6 Feb 2013 13:01:06 +0000 (13:01 +0000)
committerana <ana@opencascade.com>
Wed, 6 Feb 2013 13:01:06 +0000 (13:01 +0000)
src/GEOMGUI/GEOM_Displayer.cxx

index ca413454507293f7eda64c6d20d1f04ca786d47d..4b362a702ba08a77c1377258f3938bebc678eaad 100644 (file)
@@ -597,7 +597,9 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
 
   // set material
   Material_Model material;
-  material.fromProperties( propMap.value( GEOM::propertyName( GEOM::Material ) ).toString() );
+  // if predefined color isn't set in displayer(via GEOM_Displayer::SetColor() function)
+  if( !HasColor() )
+    material.fromProperties( propMap.value( GEOM::propertyName( GEOM::Material ) ).toString() );
   // - set front material properties
   AISShape->SetCurrentFacingModel( Aspect_TOFM_FRONT_SIDE );
   AISShape->SetMaterial( material.getMaterialOCCAspect( true ) );