From 9970a39bafd6d1109ac729d436963b6ab644c272 Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 24 Jun 2015 16:50:12 +0300 Subject: [PATCH] refs #569: enable scalar map coloring only if the active view contains Land Covers --- src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_Module.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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(); } -- 2.39.2