From b9688363aceee3d04fefec35cd5243aba9e0f9fa Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 30 Jan 2006 15:22:18 +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 fb9e5f0..30d8007 100644 --- a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx @@ -395,19 +395,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