Salome HOME
Import profiles protection (Bug #203).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index c8da5e4d08c7e7451192408b1e43091dee9d5b36..fb192aff8069ee159101f1efe13eb39cc3b15918 100644 (file)
@@ -610,19 +610,22 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( SetColorId ) );
         theMenu->addSeparator();
       }
-
-      // Add copy action
-      if( aModel->canCopy() ) {
-        theMenu->addAction( action( CopyId ) );
-        theMenu->addSeparator();
-      }
     } else if ( anAllAreProfiles ) {
       theMenu->addAction( action( SelectedGeoreferencementId ) );
       theMenu->addSeparator();
     }
 
+    // Add copy action
+    QAction* aCopyAction = action( CopyId );
+    if( aCopyAction && aCopyAction->isEnabled() ) {
+      theMenu->addAction( action( CopyId ) );
+      theMenu->addSeparator();
+    }
+
+    // Add delete action
     if( !anIsDummyObject3D )
       theMenu->addAction( action( DeleteId ) );
+
     theMenu->addSeparator();
 
     if( anIsImage || anIsPolyline || anIsPolyline3D || 
@@ -654,6 +657,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addAction( action( HideAllId ) );
     theMenu->addSeparator();
   }
+  if ( anIsOCCView ) {
+    theMenu->addSeparator();
+    theMenu->addAction( action( CopyViewerPositionId ) );
+  }
 }
 
 void HYDROGUI_Module::update( const int flags )