]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #267: Copy/paste of objects is not available.
authormzn <mzn@opencascade.com>
Tue, 24 Dec 2013 12:20:54 +0000 (12:20 +0000)
committermzn <mzn@opencascade.com>
Tue, 24 Dec 2013 12:20:54 +0000 (12:20 +0000)
src/HYDROGUI/HYDROGUI_DataModel.cxx
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index e1a64a838c2d86a0e36378a236d6eeacb3b6ad47..8163ecf5b9782e929097bf27850471ecd8e397ec 100644 (file)
@@ -555,10 +555,9 @@ bool HYDROGUI_DataModel::canCopy()
     return false;
 
   ObjectKind aKind = anObject->GetKind();
-  if( aKind == KIND_IMAGE ||
-      aKind == KIND_POLYLINE ||
-      aKind == KIND_PROFILE ||
-      aKind == KIND_CALCULATION )
+  if( aKind > KIND_UNKNOWN && aKind <= KIND_LAST &&
+      aKind != KIND_DUMMY_3D && aKind != KIND_ZONE && 
+      aKind != KIND_SHAPES_GROUP && aKind != KIND_SPLITTED_GROUP )
     return true;
 
   return false;
index d49d503a0c1115d265b5fcd065cc0a0158a31334..572fc6505bd9fbc342078197ef5ec63946e1c539 100644 (file)
@@ -603,6 +603,12 @@ 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();
index f16d2ae864a50d1a6c6c2d167c88ea6adf642e2f..66f5699b6dab5346046bf7042461f11d205c7b54 100644 (file)
@@ -929,6 +929,10 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_OBSERVE_IMAGE</source>
       <translation>Observe image</translation>
     </message>
+    <message>
+      <source>MEN_COPY</source>
+      <translation>Copy</translation>
+    </message>
     <message>
       <source>MEN_PASTE</source>
       <translation>Paste</translation>