HYDROGUI_ShapeLandCoverMap::HYDROGUI_ShapeLandCoverMap( HYDROGUI_OCCDisplayer* theDisplayer,
const Handle(AIS_InteractiveContext)& theContext,
- const Handle_HYDROData_LandCoverMap& theLandCoverMap,
+ const Handle(HYDROData_LandCoverMap)& theLandCoverMap,
const int theZLayer,
const bool theIsScalarMode )
: HYDROGUI_Shape( theContext, theLandCoverMap, theZLayer ),
myDisplayer->SetToUpdateColorScale();
}
-Handle_AIS_InteractiveObject HYDROGUI_ShapeLandCoverMap::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_ShapeLandCoverMap::createShape() const
{
Handle(HYDROData_LandCoverMap) aLandCoverMap = Handle(HYDROData_LandCoverMap)::DownCast( getObject() );
if ( !aLandCoverMap.IsNull() )
aLandCoverMapPrs->SetTable( aTable );
// Set color scale
- OCCViewer_ViewWindow* aWnd = dynamic_cast<OCCViewer_ViewWindow*>( aViewer->getViewManager()->getActiveView() );
- Handle(V3d_View) aView = aWnd->getViewPort()->getView();
- if( !aView.IsNull() )
- {
- Handle(Aspect_ColorScale) aColorScale = aView->ColorScale();
- aLandCoverMapPrs->SetColorScale( aColorScale );
- }
+ aLandCoverMapPrs->SetColorScale( myDisplayer->GetColorScale( aViewerId) );
}
}
}