X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_LandCoverMapPrs.cxx;h=196bd70ded7ab773c1078b792ca147b3efd2644f;hb=343c9561e2046ef5cab4368dbac8c30e829b6b56;hp=0afe0e31f9f880e7c544f5985d5390c2945f7388;hpb=6befa9f9669377349a681a5ca4a12b8d256cf476;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx index 0afe0e31..196bd70d 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx @@ -28,7 +28,7 @@ #include #include -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,12 +59,15 @@ 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 ); - 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(); @@ -72,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