]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Dialogs.C
some tabular fixes for the problems reported by Helge
[lyx.git] / src / frontends / Dialogs.C
index 0c222c045e5f72aa8972d83a18a3c8efc9eaae6e..5e5a42d4441cdad1acf2e7296658ec11966cdf96 100644 (file)
@@ -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;
 }