mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Andreas' "in_show" fix to bug 1119.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9661 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e5e172ac0
commit
832a46885a
@ -1,3 +1,8 @@
|
||||
2005-02-21 Andreas Vox <vox@isp.uni-luebeck.de>
|
||||
|
||||
* Dialogs.[hC] (show): prevent show() from getting called
|
||||
recursively.
|
||||
|
||||
2005-02-11 John Levon <levon@movementarian.org>
|
||||
|
||||
* screen.C: clarify comment about event queue magic
|
||||
|
@ -65,7 +65,7 @@ void Dialogs::hide(string const & name, InsetBase* inset)
|
||||
|
||||
|
||||
Dialogs::Dialogs(LyXView & lyxview)
|
||||
: lyxview_(lyxview)
|
||||
: lyxview_(lyxview), in_show_(false)
|
||||
{
|
||||
// Connect signals
|
||||
redrawGUI().connect(boost::bind(&Dialogs::redraw, this));
|
||||
@ -90,24 +90,32 @@ Dialog * Dialogs::find_or_build(string const & name)
|
||||
|
||||
void Dialogs::show(string const & name, string const & data)
|
||||
{
|
||||
Dialog * dialog = find_or_build(name);
|
||||
if (!dialog)
|
||||
if (in_show_) {
|
||||
return;
|
||||
|
||||
// FIXME! Should check that the dialog is NOT an inset dialog.
|
||||
dialog->show(data);
|
||||
}
|
||||
in_show_ = true;
|
||||
Dialog * dialog = find_or_build(name);
|
||||
if (dialog) {
|
||||
// FIXME! Should check that the dialog is NOT an inset dialog.
|
||||
dialog->show(data);
|
||||
}
|
||||
in_show_ = false;
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::show(string const & name, string const & data, InsetBase * inset)
|
||||
{
|
||||
Dialog * dialog = find_or_build(name);
|
||||
if (!dialog)
|
||||
if (in_show_) {
|
||||
return;
|
||||
|
||||
// FIXME! Should check that the dialog IS an inset dialog.
|
||||
dialog->show(data);
|
||||
open_insets_[name] = inset;
|
||||
}
|
||||
in_show_ = true;
|
||||
Dialog * dialog = find_or_build(name);
|
||||
if (dialog) {
|
||||
// FIXME! Should check that the dialog IS an inset dialog.
|
||||
dialog->show(data);
|
||||
open_insets_[name] = inset;
|
||||
}
|
||||
in_show_ = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -117,6 +117,9 @@ private:
|
||||
|
||||
///
|
||||
std::map<std::string, DialogPtr> dialogs_;
|
||||
|
||||
/// flag against a race condition due to multiclicks in Qt frontend, see bug #1119
|
||||
bool in_show_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user