Salome HOME
refs #593: Split polylines, Merge polylines icons.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index 80d85173d25091d5edd911cb4c128ed798089ae8..cb44e201a2f68800dadb181659b0e57dfb2aad4e 100644 (file)
@@ -524,6 +524,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
           theMenu->addAction( action( CreateCalculationId ) );
           break;
         case KIND_POLYLINEXY:
+          theMenu->addAction( action( ImportPolylineId ) );
           theMenu->addAction( action( CreatePolylineId ) );
           break;
         case KIND_POLYLINE:
@@ -599,6 +600,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       {
         theMenu->addAction( action( EditPolylineId ) );
         theMenu->addSeparator();
+        theMenu->addAction( action( SplitPolylinesId ) );
+        theMenu->addAction( action( MergePolylinesId ) );
+        theMenu->addSeparator();
       }
       else if( anIsPolyline3D )
       {
@@ -689,8 +693,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 );
@@ -1822,4 +1827,4 @@ void HYDROGUI_Module::setObjectRemoved( const Handle(HYDROData_Entity)& theObjec
       }
     }
   }
-}
\ No newline at end of file
+}