]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #569: enable scalar map coloring only if the active view contains Land Covers
authormzn <mzn@opencascade.com>
Wed, 24 Jun 2015 13:50:12 +0000 (16:50 +0300)
committermzn <mzn@opencascade.com>
Wed, 24 Jun 2015 13:50:12 +0000 (16:50 +0300)
src/HYDROGUI/HYDROGUI_LandCoverColoringOp.cxx
src/HYDROGUI/HYDROGUI_Module.cxx

index 0cf45ced6c33dd9a529a128d9a9797f726b8bced..2edb94810786e9c686431708f8b23ff9e2fba23f 100644 (file)
@@ -60,7 +60,7 @@ void HYDROGUI_LandCoverColoringOp::startOperation()
 
   LightApp_Application* anApp = module()->getApp();
   OCCViewer_ViewManager* aViewManager =
-    dynamic_cast<OCCViewer_ViewManager*>( anApp->getViewManager( OCCViewer_Viewer::Type(), true ) );
+    dynamic_cast<OCCViewer_ViewManager*>( anApp->getViewManager( OCCViewer_Viewer::Type(), false ) );
 
   size_t aViewId = (size_t)aViewManager->getViewModel();
 
index b55b4a086e7f7ba9f95f9b50223c69d27276aabd..77aecedec32b355f6ba39745ce9d1507bdb22943 100644 (file)
@@ -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();
         }