From: Juergen Spitzmueller Date: Wed, 8 Aug 2018 13:50:04 +0000 (+0200) Subject: Consider default output format X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3176 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b8ed2026586a2319daca3187f7a3ba3040e6f62e;p=lyx.git Consider default output format --- diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index e959836dd3..b532fe998f 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -828,12 +828,17 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) { if (initialized_) break; docstring_list names; - FuncRequest const func = lyxaction.lookupFunc(params_.name); + FuncRequest func = lyxaction.lookupFunc(params_.name); if (func.action() == LFUN_UNKNOWN_ACTION) { gui = _("Unknown action %1$s"); error(from_ascii("Unknown action %1$s"), params_.lang); break; } + if (func.action() == LFUN_BUFFER_VIEW || func.action() == LFUN_BUFFER_UPDATE) + // The default output format is in the menu without argument, + // so strip it here. + if (func.argument() == from_ascii(buffer().params().getDefaultOutputFormat())) + func = FuncRequest(func.action()); // iterate through the menubackend to find it if (!theApp()) { gui = _("Can't determine menu entry for action %1$s in batch mode");