]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
NPAL15537: Field 'Type' is wrong in 'Edit ports' dlg after changing workspace. V3_2_6pre4
authorjfa <jfa@opencascade.com>
Tue, 10 Apr 2007 06:23:34 +0000 (06:23 +0000)
committerjfa <jfa@opencascade.com>
Tue, 10 Apr 2007 06:23:34 +0000 (06:23 +0000)
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx
src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h

index c11d116732d3258e6fd43457daf21e5daa812c33..401925330d29a7a5605ff61f4c8e3a7bc95252bd 100644 (file)
@@ -289,9 +289,11 @@ void SUPERVGUI_ManagePortsDlg::init()
   connect( myTypeCombo, SIGNAL(activated(const QString&)), this, SLOT(typeChanged(const QString&)));
 
   // mkr: PAL12448
-  connect( myInList,SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)), this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
-  connect( myOutList,SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)), this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
-  
+  connect( myInList,  SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)),
+           this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
+  connect( myOutList, SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)),
+           this, SLOT(itemDeselect(QListBoxItem*, const QPoint&)));
+
   myNode->getMain()->lockedGraph( true );
 
   // asv : 11.01.05 : if a node is a loop node, then only INPUT ports can be added/removed
@@ -302,7 +304,9 @@ void SUPERVGUI_ManagePortsDlg::init()
     anUpOutputBtn->setEnabled( false );
     aDownOutputBtn->setEnabled( false );
   }
-    
+
+  // NPAL15537: initialization moved here from showEvent()
+  init( myNode );
 }
 
 /**
@@ -392,8 +396,10 @@ void SUPERVGUI_ManagePortsDlg::accept() {
        if ( aNodeName.compare(aLink->InPort()->Node()->Name()) == 0
             ||
             aNodeName.compare(aLink->OutPort()->Node()->Name()) == 0 ) {
-         QPair<QString, QString> InPair(QString(aLink->InPort()->Node()->Name()), QString(aLink->InPort()->Name()));
-         QPair<QString, QString> OutPair(QString(aLink->OutPort()->Node()->Name()), QString(aLink->OutPort()->Name()));
+         QPair<QString, QString> InPair (QString(aLink->InPort()->Node()->Name()),
+                                          QString(aLink->InPort()->Name()));
+         QPair<QString, QString> OutPair(QString(aLink->OutPort()->Node()->Name()),
+                                          QString(aLink->OutPort()->Name()));
          InPortsL.append(InPair);
          OutPortsL.append(OutPair);
        }
@@ -404,8 +410,10 @@ void SUPERVGUI_ManagePortsDlg::accept() {
          if ( aCoupledNodeName.compare(aLink->InPort()->Node()->Name()) == 0
               ||
               aCoupledNodeName.compare(aLink->OutPort()->Node()->Name()) == 0 ) {
-           QPair<QString, QString> InPair(QString(aLink->InPort()->Node()->Name()), QString(aLink->InPort()->Name()));
-           QPair<QString, QString> OutPair(QString(aLink->OutPort()->Node()->Name()), QString(aLink->OutPort()->Name()));
+           QPair<QString, QString> InPair (QString(aLink->InPort()->Node()->Name()),
+                                            QString(aLink->InPort()->Name()));
+           QPair<QString, QString> OutPair(QString(aLink->OutPort()->Node()->Name()),
+                                            QString(aLink->OutPort()->Name()));
            InPortsL.append(InPair);
            OutPortsL.append(OutPair);
          } 
@@ -522,14 +530,6 @@ void SUPERVGUI_ManagePortsDlg::reject() {
   close();
 }
 
-/**
- * Update current values on show event
- */
-void SUPERVGUI_ManagePortsDlg::showEvent( QShowEvent* theEvent ) {
-  init( myNode );
-  QDialog::showEvent( theEvent );
-}
-
 /**
  * Initialize In/Out tables with values from the given node
  */
index ac6cd16ab2a780caff52386260fa194a35dd12a3..c603b936123cf76b66dbcbb5cf4a62431448b2d3 100644 (file)
@@ -81,7 +81,6 @@ protected slots:
   void itemDeselect(QListBoxItem* item, const QPoint& point); // mkr: PAL12448
 
 protected:
-  virtual void showEvent( QShowEvent* theEvent );
   void addPort( QListBox* );
   void removePort( QListBox* );
   void moveUp( QListBox* );