[LyX/master] InsetInfo: Pass back inset-modify that do not target this inset
Juergen Spitzmueller
spitz at lyx.org
Mon Jul 13 13:51:40 UTC 2020
commit f6d9e4170d762429655b7b343e6c20ade21f3f12
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Jul 13 16:14:21 2020 +0200
InsetInfo: Pass back inset-modify that do not target this inset
Fixes #9214.
---
src/insets/InsetInfo.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp
index 0847106..b23255a 100644
--- a/src/insets/InsetInfo.cpp
+++ b/src/insets/InsetInfo.cpp
@@ -624,6 +624,8 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
return true;
case LFUN_INSET_MODIFY:
+ if (nameTranslator().find(cmd.getArg(0)) == InsetInfoParams::UNKNOWN_INFO)
+ return Inset::getStatus(cur, cmd, flag);
if (params_.validateArgument(&buffer(), cmd.argument())) {
flag.setEnabled(true);
string typestr;
@@ -648,6 +650,10 @@ void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action()) {
case LFUN_INSET_MODIFY:
+ if (nameTranslator().find(cmd.getArg(0)) == InsetInfoParams::UNKNOWN_INFO) {
+ cur.undispatched();
+ break;
+ }
cur.recordUndo();
setInfo(to_utf8(cmd.argument()));
cur.forceBufferUpdate();
More information about the lyx-cvs
mailing list