From 4b2ee81092cc042b8e51c7e434b7aa9c48147f9d Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 10 Apr 2007 06:23:34 +0000 Subject: [PATCH] NPAL15537: Field 'Type' is wrong in 'Edit ports' dlg after changing workspace. --- src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx | 32 +++++++++++----------- src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h | 1 - 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx index c11d116..4019253 100644 --- a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.cxx @@ -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 InPair(QString(aLink->InPort()->Node()->Name()), QString(aLink->InPort()->Name())); - QPair OutPair(QString(aLink->OutPort()->Node()->Name()), QString(aLink->OutPort()->Name())); + QPair InPair (QString(aLink->InPort()->Node()->Name()), + QString(aLink->InPort()->Name())); + QPair 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 InPair(QString(aLink->InPort()->Node()->Name()), QString(aLink->InPort()->Name())); - QPair OutPair(QString(aLink->OutPort()->Node()->Name()), QString(aLink->OutPort()->Name())); + QPair InPair (QString(aLink->InPort()->Node()->Name()), + QString(aLink->InPort()->Name())); + QPair 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 */ diff --git a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h index ac6cd16..c603b93 100644 --- a/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h +++ b/src/SUPERVGUI/SUPERVGUI_ManagePortsDlg.h @@ -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* ); -- 2.39.2