]> SALOME platform Git repositories - modules/hydro.git/blobdiff - src/HYDROGUI/HYDROGUI_Module.cxx
Salome HOME
Creat\Edit stream operation.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index 616b4a9accb794a6e181f9dfa8d2362550c9a024..604ed597512ab270758189fc867e779fdf846210 100644 (file)
@@ -240,6 +240,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
   bool anIsRegion = false;
   bool anIsZone = false;
   bool anIsObstacle = false;
+  bool anIsStream = false;
   bool anIsGeomObject = false;
 
   // check the selected GEOM objects
@@ -262,7 +263,8 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       anIsVisibleInSelection |= aVisibility;
       anIsHiddenInSelection |= !aVisibility;
 
-      if( anObject->GetKind() == KIND_IMAGE )
+      ObjectKind anObjectKind = anObject->GetKind();
+      if( anObjectKind == KIND_IMAGE )
       {
         anIsImage = true;
         Handle(HYDROData_Image) anImage = Handle(HYDROData_Image)::DownCast( anObject );
@@ -289,11 +291,12 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
           }
         }
       }
-      else if( anObject->GetKind() == KIND_POLYLINEXY )
+      else if( anObjectKind == KIND_POLYLINEXY )
         anIsPolyline = true;
-      else if( anObject->GetKind() == KIND_POLYLINE )
+      else if( anObjectKind == KIND_POLYLINE )
         anIsPolyline3D = true;
-      else if( anObject->GetKind() == KIND_PROFILE ) {
+      else if( anObjectKind == KIND_PROFILE )
+      {
         anIsProfile = true;
         aNbOfSelectedProfiles++;
 
@@ -303,20 +306,22 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
           anIsValidProfile = true;
         }
       }
-      else if( anObject->GetKind() == KIND_CALCULATION )
+      else if( anObjectKind == KIND_CALCULATION )
         anIsCalculation = true;
-      else if( anObject->GetKind() == KIND_IMMERSIBLE_ZONE )
+      else if( anObjectKind == KIND_IMMERSIBLE_ZONE )
         anIsImmersibleZone = true;
-      else if( anObject->GetKind() == KIND_VISUAL_STATE )
+      else if( anObjectKind == KIND_VISUAL_STATE )
         anIsVisualState = true;
-      else if( anObject->GetKind() == KIND_REGION )
+      else if( anObjectKind == KIND_REGION )
         anIsRegion = true;
-      else if( anObject->GetKind() == KIND_ZONE )
+      else if( anObjectKind == KIND_ZONE )
         anIsZone = true;
-      else if( anObject->GetKind() == KIND_BATHYMETRY )
+      else if( anObjectKind == KIND_BATHYMETRY )
         anIsBathymetry = true;
-      else if( anObject->GetKind() == KIND_OBSTACLE )
+      else if( anObjectKind == KIND_OBSTACLE )
         anIsObstacle = true;
+      else if( anObjectKind == KIND_STREAM )
+        anIsStream = true;
     }
 
     anIsGeomObject = HYDROData_Tool::IsGeometryObject( anObject );
@@ -436,6 +441,11 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( EditImmersibleZoneId ) );
         theMenu->addSeparator();
       }
+      else if( anIsStream )
+      {
+        theMenu->addAction( action( EditStreamId ) );
+        theMenu->addSeparator();
+      }
       else if( anIsVisualState && anIsObjectBrowser )
       {
         theMenu->addAction( action( SaveVisualStateId ) );
@@ -458,7 +468,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addSeparator();
 
     if( anIsImage || anIsPolyline || anIsPolyline3D || anIsImmersibleZone || anIsZone || 
-        anIsRegion || anIsBathymetry || anIsObstacle || anIsValidProfile )
+        anIsRegion || anIsBathymetry || anIsObstacle || anIsStream || anIsValidProfile )
     {
       if( anIsHiddenInSelection )
         theMenu->addAction( action( ShowId ) );