]> git.lyx.org Git - features.git/commitdiff
Fix bug #8540 by not resetting the GUI if the request came from
authorRichard Heck <rgheck@lyx.org>
Mon, 17 Feb 2014 20:49:53 +0000 (15:49 -0500)
committerRichard Heck <rgheck@lyx.org>
Tue, 18 Feb 2014 15:42:52 +0000 (10:42 -0500)
the minibuffer. As the comments explain, this leaves a different
bug, but (a) it isn't a crash and (b) it probably won't affect
many users, if *any* users.

src/frontends/qt4/GuiApplication.cpp

index 1b58e9e891e58dd34b57e86e124068179e3ebfd7..f32c7469b88a67e4662df4b688063584335edfd2 100644 (file)
@@ -1677,7 +1677,18 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                }
 
                actOnUpdatedPrefs(lyxrc_orig, lyxrc);
-               resetGui();
+
+               // If the request comes from the minibuffer, then we can't reset
+               // the GUI, since that would destory the minibuffer itself and
+               // cause a crash, since we are currently in one of the methods of 
+               // GuiCommandBuffer. See bug #8540. 
+               if (cmd.origin() != FuncRequest::COMMANDBUFFER)
+                       resetGui();
+               // else
+               //   FIXME Unfortunately, that leaves a bug here, since we cannot
+               //   reset the GUI in this case. If the changes to lyxrc affected the
+               //   UI, then, nothing would happen. This seems fairly unlikely, but 
+               //   it definitely is a bug.
 
                break;
        }