Salome HOME
Merge branch 'BR_LCM_COMP' into HEAD
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_LandCoverMapPrs.cxx
index 5e8a17f696910f1d83e181a2a12360e4faae775a..c9f09cf5f2a812879efda42d0d657b4bdaefd918 100644 (file)
@@ -59,9 +59,15 @@ void HYDROGUI_LandCoverMapPrs::SetLandCoverMap( const Handle(HYDROData_LandCover
 
 void HYDROGUI_LandCoverMapPrs::UpdateColors()
 {
-  Set( myLCMap->GetShape() );
   SetMaterial( Graphic3d_NOM_PLASTIC );
-  HYDROData_LandCoverMap::Iterator anIt( myLCMap );
+  if( myLCMap.IsNull() )
+  {
+    Set( TopoDS_Shape() );
+    return;
+  }
+  
+  Set( myLCMap->GetShape() );
+  HYDROData_LandCoverMap::Explorer anIt( myLCMap );
   for( ; anIt.More(); anIt.Next() )
   {
     TopoDS_Face aFace = anIt.Face();
@@ -69,7 +75,8 @@ void HYDROGUI_LandCoverMapPrs::UpdateColors()
     Quantity_Color aColor = GetColor( aStricklerType );
     SetCustomColor( aFace, aColor );
     SetCustomWidth( aFace, 1.0 );
-  }
+  } 
+  SetTransparency( myLCMap->GetTransparency() );
 }
 
 Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const