mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 19:14:51 +00:00
Make sure that in_show_ is reset to false, even if an exception is thrown
when we're trying to show a dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26142 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4d63bd347b
commit
1c5003c4ef
@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#include "support/lassert.h"
|
#include "support/lassert.h"
|
||||||
#include "support/debug.h"
|
#include "support/debug.h"
|
||||||
|
#include "support/ExceptionMessage.h"
|
||||||
#include "support/FileName.h"
|
#include "support/FileName.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "support/gettext.h"
|
#include "support/gettext.h"
|
||||||
@ -2219,11 +2220,17 @@ void GuiView::showDialog(string const & name, string const & data,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
d.in_show_ = true;
|
d.in_show_ = true;
|
||||||
Dialog * dialog = findOrBuild(name, false);
|
try {
|
||||||
if (dialog) {
|
Dialog * dialog = findOrBuild(name, false);
|
||||||
dialog->showData(data);
|
if (dialog) {
|
||||||
if (inset)
|
dialog->showData(data);
|
||||||
d.open_insets_[name] = inset;
|
if (inset)
|
||||||
|
d.open_insets_[name] = inset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ExceptionMessage const & ex) {
|
||||||
|
d.in_show_ = false;
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
d.in_show_ = false;
|
d.in_show_ = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user