From: mzn Date: Tue, 24 Dec 2013 12:20:54 +0000 (+0000) Subject: Bug #267: Copy/paste of objects is not available. X-Git-Tag: BR_hydro_v_0_7~68 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ccb8b011d512b2a5fb6dc87daa17cc3caaed5639;p=modules%2Fhydro.git Bug #267: Copy/paste of objects is not available. --- diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index e1a64a83..8163ecf5 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -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; diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index d49d503a..572fc650 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -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(); diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index f16d2ae8..66f5699b 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -929,6 +929,10 @@ Would you like to remove all references from the image? MEN_OBSERVE_IMAGE Observe image + + MEN_COPY + Copy + MEN_PASTE Paste