diff --git a/src/frontends/qt4/QRefDialog.C b/src/frontends/qt4/QRefDialog.C index 0d3870031e..e95e823a1a 100644 --- a/src/frontends/qt4/QRefDialog.C +++ b/src/frontends/qt4/QRefDialog.C @@ -33,6 +33,8 @@ QRefDialog::QRefDialog(QRef * form) form_, SLOT(slotApply())); connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose())); + connect(closePB, SIGNAL(clicked()), + this, SLOT( reset_dialog() ) ); connect( typeCO, SIGNAL( activated(int) ), this, SLOT( changed_adaptor() ) ); @@ -141,9 +143,16 @@ void QRefDialog::updateClicked() } +void QRefDialog::reset_dialog() { + form_->at_ref_ = false; + form_->setGotoRef(); +} + + void QRefDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); + reset_dialog(); e->accept(); } diff --git a/src/frontends/qt4/QRefDialog.h b/src/frontends/qt4/QRefDialog.h index bcd9195949..92b49d473b 100644 --- a/src/frontends/qt4/QRefDialog.h +++ b/src/frontends/qt4/QRefDialog.h @@ -41,6 +41,8 @@ public Q_SLOTS: void sortToggled(bool); void updateClicked(); +protected Q_SLOTS: + void reset_dialog(); protected: void closeEvent(QCloseEvent * e); private: