From: asv Date: Mon, 7 Feb 2005 06:34:59 +0000 (+0000) Subject: Fix for bug PAL7960: Editing() only after SUCCESSFUL port creation. X-Git-Tag: T_22_03_05~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48a19a81818d1dcc60860468aaeb7e6c7a866ec0;p=modules%2Fsuperv.git Fix for bug PAL7960: Editing() only after SUCCESSFUL port creation. --- diff --git a/src/SUPERVGUI/SUPERVGUI_Clipboard.cxx b/src/SUPERVGUI/SUPERVGUI_Clipboard.cxx index 4f20f9f..a9d4637 100644 --- a/src/SUPERVGUI/SUPERVGUI_Clipboard.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Clipboard.cxx @@ -367,8 +367,6 @@ void SUPERVGUI_Clipboard::pastePort( SUPERVGUI_CanvasNode* node ) SUPERVGUI_Main* aMain = Supervision.getMain(); if ( !CORBA::is_nil(aPort) && aMain ) { - aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960 - SUPERV::INode_var aNode = node->getInlineNode(); if (!CORBA::is_nil(aNode)) { QString aName = aPort->Name(); @@ -379,16 +377,20 @@ void SUPERVGUI_Clipboard::pastePort( SUPERVGUI_CanvasNode* node ) QStringList aNames = node->getPortsNamesIN(aNode, true); if (aNames.contains(aName)) QMessageBox::warning( QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_PORT_EXIST") ); - else + else { + aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960 aPastePort = aNode->InPort(aName.latin1(), aType.latin1()); + } } else { //check if port with such name is already exists QStringList aNames = node->getPortsNamesIN(aNode, false); if (aNames.contains(aName)) QMessageBox::warning( QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_PORT_EXIST") ); - else + else { + aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960 aPastePort = aNode->OutPort(aName.latin1(), aType.latin1()); + } } if ( !CORBA::is_nil(aPastePort) ) node->createPort( aPastePort.in() );