From 3ef105e2253b4f8a2543bcafef6584dc67d1986e Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 30 Jan 2006 15:18:08 +0000 Subject: [PATCH] Additional fix for bug PAL11332 : In Edit ports, changing the workspace adds the entered ports twice. --- src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx index a480e3e..bbf2d1e 100644 --- a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx @@ -529,19 +529,19 @@ void SUPERVGUI_ManagePortsDlg::init( const SUPERVGUI_CanvasNode* theNode ) { // 1. fill myTypeCombo with all available types myTypeCombo->insertStrList( gTypes ); - // 2. mkr : PAL11332 : clear Input and Output listboxes - myInList->clear(); - myOutList->clear(); - - // 3. fill Input and Output listboxes with Ports' names/types + // 2. fill Input and Output listboxes with Ports' names/types QStringList aTypes; SUPERV_Ports aPorts = aINode->Ports(); for ( int i=0; i < aPorts->length(); i++ ) { if ( aPorts[i]->IsGate() ) continue; - if ( aPorts[i]->IsInput() ) + if ( aPorts[i]->IsInput() + && + !myInList->findItem( QString( "%1 (%2)" ).arg( aPorts[i]->Name() ).arg( aPorts[i]->Type() ) ) ) // mkr : PAL11332 new PortListItem( myInList, aPorts[i]->Name(), aPorts[i]->Type() ); - else + if ( !aPorts[i]->IsInput() + && + !myOutList->findItem( QString( "%1 (%2)" ).arg( aPorts[i]->Name() ).arg( aPorts[i]->Type() ) ) ) // mkr : PAL11332 new PortListItem( myOutList, aPorts[i]->Name(), aPorts[i]->Type() ); } } -- 2.39.2