So what's the status here? This look OK at this point? The neatest thing to do would have been just to put form_->setGotoRef() in closeEvent(). That's what I tried first, and it didn't work. I can't remember why now. I think it was because closeEvent() doesn't routinely get triggered when the cancel button is hit. But closePB::clicked is already connected to slotClose(), anyway.
Richard >> Index: QRefDialog.C >> =================================================================== >> --- QRefDialog.C (revision 17850) >> +++ QRefDialog.C (working copy) >> @@ -33,6 +33,8 @@ >> 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 @@ >> } >> > I think you want to put soltClose() in there because it does hidden > things, or just call accept() instead maybe. >> +void QRefDialog::reset_dialog() { >> + form_->at_ref_ = false; >> + form_->setGotoRef(); > + slotClose(); >> +} >> + >> + >> void QRefDialog::closeEvent(QCloseEvent * e) >> { >> form_->slotWMHide(); >> + reset_dialog(); > > ouch, but then slotClose() will call closeEvent(), so we shouldn't put > it in there. > >> e->accept(); >> } >> >> Index: QRefDialog.h >> =================================================================== >> --- QRefDialog.h (revision 17850) >> +++ QRefDialog.h (working copy) >> @@ -41,6 +41,8 @@ >> void sortToggled(bool); >> void updateClicked(); >> >> +protected Q_SLOTS: >> + void reset_dialog(); >> protected: >> void closeEvent(QCloseEvent * e); >> private: > -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto