From: mzn Date: Wed, 24 Jun 2015 13:50:12 +0000 (+0300) Subject: refs #569: enable scalar map coloring only if the active view contains Land Covers X-Git-Tag: v1.4.2~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9970a39bafd6d1109ac729d436963b6ab644c272;p=modules%2Fhydro.git refs #569: enable scalar map coloring only if the active view contains Land Covers --- diff --git a/src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx b/src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx index 0cf45ced..2edb9481 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx @@ -60,7 +60,7 @@ void HYDROGUI_LandCoverColoringOp::startOperation() LightApp_Application* anApp = module()->getApp(); OCCViewer_ViewManager* aViewManager = - dynamic_cast( anApp->getViewManager( OCCViewer_Viewer::Type(), true ) ); + dynamic_cast( anApp->getViewManager( OCCViewer_Viewer::Type(), false ) ); size_t aViewId = (size_t)aViewManager->getViewModel(); diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index b55b4a08..77aecede 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -655,7 +655,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient, theMenu->addAction( action( DuplicateStricklerTableId ) ); theMenu->addSeparator(); - if ( !isLandCoversScalarMapModeOn( anActiveViewId ) ) { + if ( !isLandCoversScalarMapModeOn( anActiveViewId ) && + !getObjectShapes( anActiveViewId, KIND_LAND_COVER ).isEmpty() ) { theMenu->addAction( action( LandCoverScalarMapModeOnId ) ); theMenu->addSeparator(); }