From 48a19a81818d1dcc60860468aaeb7e6c7a866ec0 Mon Sep 17 00:00:00 2001 From: asv Date: Mon, 7 Feb 2005 06:34:59 +0000 Subject: [PATCH] Fix for bug PAL7960: Editing() only after SUCCESSFUL port creation. --- src/SUPERVGUI/SUPERVGUI_Clipboard.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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() ); -- 2.39.2