Salome HOME
patch for correct compilation on Linux
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index cad9dc666008bdef9ea84852fb0e13ffd325ce31..000ba16cc510a53ddeeddcf14dbe845ea2f36868 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 ) );
@@ -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 ) );