mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix citation bug: In certain circumstances, attempts to insert a new citation
would instead change an old one. The problem was that we were hiding the dialog with hide(), which does not trigger closeEvent(). So we have to implement hideEvent(). http://marc.info/?l=lyx-devel&m=121278861019829&w=2 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26143 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1c5003c4ef
commit
419642ad9e
@ -49,6 +49,15 @@ protected:
|
||||
Dialog::disconnect();
|
||||
ev->accept();
|
||||
}
|
||||
/// Any dialog that overrides this method should make sure to call it.
|
||||
void hideEvent(QHideEvent * ev)
|
||||
{
|
||||
if (!ev->spontaneous()) {
|
||||
clearParams();
|
||||
Dialog::disconnect();
|
||||
ev->accept();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -105,8 +105,6 @@ GuiCitation::GuiCitation(GuiView & lv)
|
||||
connect(textAfterED, SIGNAL(returnPressed()),
|
||||
this, SLOT(on_okPB_clicked()));
|
||||
|
||||
connect(this, SIGNAL(rejected()), this, SLOT(cleanUp()));
|
||||
|
||||
selectionManager = new GuiSelectionManager(availableLV, selectedLV,
|
||||
addPB, deletePB, upPB, downPB, &available_model_, &selected_model_);
|
||||
connect(selectionManager, SIGNAL(selectionChanged()),
|
||||
@ -127,13 +125,6 @@ GuiCitation::~GuiCitation()
|
||||
}
|
||||
|
||||
|
||||
void GuiCitation::cleanUp()
|
||||
{
|
||||
clearParams();
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
void GuiCitation::closeEvent(QCloseEvent * e)
|
||||
{
|
||||
clearSelection();
|
||||
|
@ -44,7 +44,6 @@ public:
|
||||
~GuiCitation();
|
||||
|
||||
private Q_SLOTS:
|
||||
void cleanUp();
|
||||
void on_okPB_clicked();
|
||||
void on_cancelPB_clicked();
|
||||
void on_restorePB_clicked();
|
||||
|
Loading…
Reference in New Issue
Block a user