Salome HOME
Bugs 153, 154.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index cad9dc666008bdef9ea84852fb0e13ffd325ce31..3433e99aec960b32d6376441fc60762b015dd008 100644 (file)
@@ -267,6 +267,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
   bool anIsZone = false;
   bool anIsObstacle = false;
   bool anIsStream = false;
+  bool anIsChannel = false;
   bool anIsGeomObject = false;
 
   // check the selected GEOM objects
@@ -348,6 +349,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         anIsObstacle = true;
       else if( anObjectKind == KIND_STREAM )
         anIsStream = true;
+      else if( anObjectKind == KIND_CHANNEL )
+        anIsChannel = true;
     }
 
     anIsGeomObject = HYDROData_Tool::IsGeometryObject( anObject );
@@ -372,6 +375,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
           theMenu->addAction( action( ImportBathymetryId ) );
           break;
         case KIND_ARTIFICIAL_OBJECT:
+          theMenu->addAction( action( CreateChannelId ) );
           break;
         case KIND_NATURAL_OBJECT:
           theMenu->addAction( action( CreateImmersibleZoneId ) );
@@ -428,7 +432,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
             theMenu->addAction( action( EditSplittedImageId ) );
         }
 
-        theMenu->addAction( action( ObserveImageId ) );
+        //RKV: BUG#98: theMenu->addAction( action( ObserveImageId ) );
         theMenu->addAction( action( ExportImageId ) );
         theMenu->addSeparator();
 
@@ -443,6 +447,11 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( SplitImageId ) );
         theMenu->addSeparator();
       }
+      else if( anIsBathymetry )
+      {
+        theMenu->addAction( action( EditImportedBathymetryId ) );
+        theMenu->addSeparator();
+      }
       else if( anIsPolyline )
       {
         theMenu->addAction( action( EditPolylineId ) );
@@ -475,6 +484,11 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( EditStreamId ) );
         theMenu->addSeparator();
       }
+      else if( anIsChannel )
+      {
+        theMenu->addAction( action( EditChannelId ) );
+        theMenu->addSeparator();
+      }
       else if( anIsVisualState && anIsObjectBrowser )
       {
         theMenu->addAction( action( SaveVisualStateId ) );
@@ -496,8 +510,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addAction( action( DeleteId ) );
     theMenu->addSeparator();
 
-    if( anIsImage || anIsPolyline || anIsPolyline3D || anIsImmersibleZone || anIsZone || 
-        anIsRegion || anIsBathymetry || anIsObstacle || anIsStream || anIsValidProfile )
+    if( anIsImage || anIsPolyline || anIsPolyline3D || 
+        anIsImmersibleZone || anIsZone || anIsRegion ||
+        anIsBathymetry || anIsObstacle || anIsStream ||
+        anIsChannel || anIsValidProfile )
     {
       if( anIsHiddenInSelection )
         theMenu->addAction( action( ShowId ) );