From: asl Date: Mon, 16 Nov 2015 06:43:18 +0000 (+0300) Subject: patch for bug with transparency in the neutral point X-Git-Tag: v1.5~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=600f2da1f52d1af68aee1072e14078f78b233961;p=modules%2Fhydro.git patch for bug with transparency in the neutral point --- diff --git a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx index 5c87c732..c9f09cf5 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx @@ -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