Quick fix for a problem noted by Stefan. The better fix is to migrate this

dialog, and all the others, to the new framework. GuiRef still inherits from
GuiDialog, rather than from DialogView.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26234 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-08-25 17:38:57 +00:00
parent 3a5e4ab8ca
commit 9c2a1a828a
2 changed files with 11 additions and 1 deletions

View File

@ -59,7 +59,7 @@ GuiRef::GuiRef(GuiView & lv)
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply())); connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose())); connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
connect(closePB, SIGNAL(clicked()), this, SLOT(reset_dialog())); connect(closePB, SIGNAL(clicked()), this, SLOT(reset_dialog()));
connect(this, SIGNAL(rejected()), this, SLOT(reset_dialog())); connect(this, SIGNAL(rejected()), this, SLOT(dialog_rejected()));
connect(typeCO, SIGNAL(activated(int)), connect(typeCO, SIGNAL(activated(int)),
this, SLOT(changed_adaptor())); this, SLOT(changed_adaptor()));
@ -178,6 +178,15 @@ void GuiRef::updateClicked()
} }
void GuiRef::dialog_rejected()
{
reset_dialog();
// We have to do this manually, instead of calling slotClose(), because
// the dialog has already been made invisible before rejected() triggers.
Dialog::disconnect();
}
void GuiRef::reset_dialog() void GuiRef::reset_dialog()
{ {
at_ref_ = false; at_ref_ = false;

View File

@ -40,6 +40,7 @@ private Q_SLOTS:
void sortToggled(bool); void sortToggled(bool);
void updateClicked(); void updateClicked();
void reset_dialog(); void reset_dialog();
void dialog_rejected();
private: private:
/// ///