From 600f2da1f52d1af68aee1072e14078f78b233961 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 16 Nov 2015 09:43:18 +0300 Subject: [PATCH] patch for bug with transparency in the neutral point --- src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 -- 2.39.2