mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Fix bug #6950: Cursor remains in waiting state after incompatible command.
P.S. How do we prevent other cases like this? By throwing exceptions, we never know whether it's assured that we will return to the function to call setBusy(false). In JAVA you always have to either make a function throwable or to catch the exception, but AFAICS you have to crawl through the code to find out whether a function can throw an exception. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35714 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
72939019a9
commit
4968c32293
@ -1717,7 +1717,13 @@ Buffer * GuiView::loadDocument(FileName const & filename, bool tolastfiles)
|
||||
{
|
||||
setBusy(true);
|
||||
|
||||
Buffer * newBuffer = checkAndLoadLyXFile(filename);
|
||||
Buffer * newBuffer = 0;
|
||||
try {
|
||||
newBuffer = checkAndLoadLyXFile(filename);
|
||||
} catch (ExceptionMessage const & e) {
|
||||
setBusy(false);
|
||||
throw(e);
|
||||
}
|
||||
|
||||
if (!newBuffer) {
|
||||
message(_("Document not loaded."));
|
||||
|
Loading…
Reference in New Issue
Block a user