From: Juergen Spitzmueller Date: Thu, 2 Jan 2020 13:09:01 +0000 (+0100) Subject: Further improve status check of master-buffer-forall X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a14194200c8dcbe64f1a2123b6f8a609180de3e7;p=features.git Further improve status check of master-buffer-forall --- diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 428d0cee69..eec1b7ae6e 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -1971,13 +1971,23 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) if (doc_buffer == 0) { flag.message(from_utf8(N_("Command not allowed without a buffer open"))); enable = false; + break; } FuncRequest const cmdToPass = lyxaction.lookupFunc(cmd.getLongArg(0)); if (cmdToPass.action() == LFUN_UNKNOWN_ACTION) { - flag.message(from_utf8(N_("the argument of master-buffer-forall is not valid"))); + flag.message(from_utf8(N_("Invalid argument of master-buffer-forall"))); enable = false; - } else { - enable = true; + break; + } + enable = false; + for (Buffer * buf : doc_buffer->allRelatives()) { + GuiWorkArea * wa = workArea(*buf); + if (!wa) + continue; + if (wa->bufferView().getStatus(cmdToPass, flag)) { + enable = flag.enabled(); + break; + } } break; }