Salome HOME
Merge branch 'BR_v14_rc' of ssh://git.salome-platform.org/modules/hydro into BR_v14_rc
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index a340182ee10c4163b5d4d334cde6f3094248b6c1..60d109b32a0d713e5232d2d6cf969879f1aa4567 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();
         }
@@ -683,8 +684,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       theMenu->addSeparator();
     }
 
-    if (anIsPolyline || anIsPolyline3D)
-      theMenu->addAction( action( ExportPolylineId ) );
+    bool anIsPoly = anIsPolyline || anIsPolyline3D;
+    if ((anIsPoly && !anIsLandCover) || (!anIsPoly && anIsLandCover))
+      theMenu->addAction( action( ExportToShapeFileID ) );
 
     // Add copy action
     QAction* aCopyAction = action( CopyId );
@@ -792,7 +794,7 @@ void HYDROGUI_Module::createPreferences()
 
   int StricklerTableGroup = addPreference( tr( "PREF_GROUP_STRICKLER_TABLE" ), genTab );
   int defaultStricklerCoef = addPreference( tr( "PREF_DEFAULT_STRICKLER_COEFFICIENT" ), StricklerTableGroup,
-                                            LightApp_Preferences::DblSpin, "HYDRO", "default_strickler_coefficient" );
+                                            LightApp_Preferences::DblSpin, "preferences", "default_strickler_coefficient" );
   setPreferenceProperty( defaultStricklerCoef, "precision", 2 );
   setPreferenceProperty( defaultStricklerCoef, "min", 0.00 );
   setPreferenceProperty( defaultStricklerCoef, "max", 1000000.00 );
@@ -1050,6 +1052,8 @@ void HYDROGUI_Module::setObjectVisible( const int theViewId,
 
     if ( theObject->GetKind() == KIND_BATHYMETRY && theState ) {
       setLandCoversScalarMapModeOff( theViewId );
+    } else if ( theObject->GetKind() == KIND_LAND_COVER && theState ) {
+      getOCCDisplayer()->SetToUpdateColorScale();
     }
   }
 }