From: mkr Date: Mon, 30 Jan 2006 15:18:08 +0000 (+0000) Subject: Additional fix for bug PAL11332 : In Edit ports, changing the workspace adds the... X-Git-Tag: mergeto_trunk_07Feb06~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ef105e2253b4f8a2543bcafef6584dc67d1986e;p=modules%2Fsuperv.git Additional fix for bug PAL11332 : In Edit ports, changing the workspace adds the entered ports twice. --- 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() ); } }