]> 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:22:18 +0000 (15:22 +0000)
committermkr <mkr@opencascade.com>
Mon, 30 Jan 2006 15:22:18 +0000 (15:22 +0000)
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx

index fb9e5f0ac8f76545a8c15f6bd69b3d9f369f5a89..30d8007388999ea682039eef391ab569e2ee5c23 100644 (file)
@@ -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() );
   }
 }