Salome HOME
refs #682, #684 - #686: create icons for land cover map operations.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_LandCoverMapPrs.cxx
index 5e8a17f696910f1d83e181a2a12360e4faae775a..196bd70ded7ab773c1078b792ca147b3efd2644f 100644 (file)
@@ -28,7 +28,7 @@
 #include <QColor>
 #include <QString>
 
-const Quantity_Color EDGES_COLOR = Quantity_NOC_WHITE;
+const Quantity_Color EDGES_COLOR = Quantity_NOC_SLATEGRAY;
 const int HILIGHT_ISO_NB = 10;
 
 IMPLEMENT_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape )
@@ -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