]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Additional fix for bug PAL11332 : In Edit ports, changing the workspace adds the...
authormkr <mkr@opencascade.com>
Mon, 30 Jan 2006 15:18:08 +0000 (15:18 +0000)
committermkr <mkr@opencascade.com>
Mon, 30 Jan 2006 15:18:08 +0000 (15:18 +0000)
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx

index a480e3e26a73938e92e263ac580ef5778988fc94..bbf2d1e1329e5d33e6763d5edf2d4578b38590ef 100644 (file)
@@ -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() );
   }
 }