mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +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/debug.h"
|
||||
#include "support/ExceptionMessage.h"
|
||||
#include "support/FileName.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/gettext.h"
|
||||
@ -2219,11 +2220,17 @@ void GuiView::showDialog(string const & name, string const & data,
|
||||
return;
|
||||
|
||||
d.in_show_ = true;
|
||||
Dialog * dialog = findOrBuild(name, false);
|
||||
if (dialog) {
|
||||
dialog->showData(data);
|
||||
if (inset)
|
||||
d.open_insets_[name] = inset;
|
||||
try {
|
||||
Dialog * dialog = findOrBuild(name, false);
|
||||
if (dialog) {
|
||||
dialog->showData(data);
|
||||
if (inset)
|
||||
d.open_insets_[name] = inset;
|
||||
}
|
||||
}
|
||||
catch (ExceptionMessage const & ex) {
|
||||
d.in_show_ = false;
|
||||
throw ex;
|
||||
}
|
||||
d.in_show_ = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user