From 4a67bd31bd82cca98163814d45549cfca02fe6ac Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 23 Apr 2007 15:25:02 +0000 Subject: [PATCH] Fix bug 3461. Add reset_dialog() method that resets the QRef::at_ref_ boolean on dialog close. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17920 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/QRefDialog.C | 9 +++++++++ src/frontends/qt4/QRefDialog.h | 2 ++ 2 files changed, 11 insertions(+) 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: