X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfunc.C;h=dbda91f6c8d513a28b6d636f8e9c8cf4dddacc09;hb=ec15dfd2a3049bbabcaf7d41de5709a5faf41cc0;hp=ed16fc23ec3f7b8038401c67e794016e589e1bd8;hpb=4416bb3609c10970eabaace6a62830728e4790a9;p=lyx.git diff --git a/src/lyxfunc.C b/src/lyxfunc.C index ed16fc23ec..dbda91f6c8 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -377,7 +377,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4 */ Buffer * buf; - if (cmd.origin == FuncRequest::UI && !lyx_view_->hasFocus()) + if (cmd.origin == FuncRequest::MENU && !lyx_view_->hasFocus()) buf = 0; else buf = lyx_view_->buffer(); @@ -1252,6 +1252,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd) name == "bibtex" || name == "index" || name == "label" || + name == "nomenclature" || name == "ref" || name == "toc" || name == "url") { @@ -1736,26 +1737,18 @@ void LyXFunc::dispatch(FuncRequest const & cmd) } } } - if (!quitting) - // FIXME UNICODE: _() does not support anything but ascii. - // Do we need a to_ascii() method? + if (!quitting) { + lyx_view_->updateMenubar(); + lyx_view_->updateToolbars(); sendDispatchMessage(getMessage(), cmd); + } } void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd) { - /* 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) { - lyx_view_->updateMenubar(); - lyx_view_->updateToolbars(); - } - - const bool verbose = (cmd.origin == FuncRequest::UI + const bool verbose = (cmd.origin == FuncRequest::MENU + || cmd.origin == FuncRequest::TOOLBAR || cmd.origin == FuncRequest::COMMANDBUFFER); if (cmd.action == LFUN_SELF_INSERT || !verbose) {