]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
patch for bug with transparency in the neutral point
authorasl <asl@opencascade.com>
Mon, 16 Nov 2015 06:43:18 +0000 (09:43 +0300)
committerasl <asl@opencascade.com>
Mon, 16 Nov 2015 06:43:18 +0000 (09:43 +0300)
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx

index 5c87c7327d31ddcf0572e03aa6ac7b7807e3d3cb..c9f09cf5f2a812879efda42d0d657b4bdaefd918 100644 (file)
@@ -59,11 +59,14 @@ void HYDROGUI_LandCoverMapPrs::SetLandCoverMap( const Handle(HYDROData_LandCover
 
 void HYDROGUI_LandCoverMapPrs::UpdateColors()
 {
-  if( !myLCMap.IsNull() )
-    SetTransparency( myLCMap->GetTransparency() );
-
-  Set( myLCMap->GetShape() );
   SetMaterial( Graphic3d_NOM_PLASTIC );
+  if( myLCMap.IsNull() )
+  {
+    Set( TopoDS_Shape() );
+    return;
+  }
+  
+  Set( myLCMap->GetShape() );
   HYDROData_LandCoverMap::Explorer anIt( myLCMap );
   for( ; anIt.More(); anIt.Next() )
   {
@@ -71,8 +74,9 @@ void HYDROGUI_LandCoverMapPrs::UpdateColors()
     QString aStricklerType = anIt.StricklerType();
     Quantity_Color aColor = GetColor( aStricklerType );
     SetCustomColor( aFace, aColor );
-     SetCustomWidth( aFace, 1.0 );
-  }
+    SetCustomWidth( aFace, 1.0 );
+  } 
+  SetTransparency( myLCMap->GetTransparency() );
 }
 
 Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const