+2005-09-12 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * lyxfunc.C (sendDispatchMessage): do not update menubar/toolbar
+ when command is internal. (bug 1941)
+
2005-09-20 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text2.C (cursorRight): do not honor boundary when at the end of
application can still be accessed without giving focus to
the main window. In this case, we want to disable the menu
entries that are buffer-related.
+
+ Note that this code is not perfect, as bug 1941 attests:
+ http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4
*/
Buffer * buf;
if (cmd.origin == FuncRequest::UI && !owner->hasFocus())
void LyXFunc::sendDispatchMessage(string const & msg, FuncRequest const & cmd)
{
- owner->updateMenubar();
- owner->updateToolbars();
+ /* When an action did not originate from the UI/kbd, it makes
+ * sense to avoid updating the GUI. It turns out that this
+ * fixes bug 1941, for reasons that are described here:
+ * http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4
+ */
+ if (cmd.origin != FuncRequest::INTERNAL) {
+ owner->updateMenubar();
+ owner->updateToolbars();
+ }
const bool verbose = (cmd.origin == FuncRequest::UI
|| cmd.origin == FuncRequest::COMMANDBUFFER);