]> git.lyx.org Git - lyx.git/commitdiff
InsetInfo: Pass back inset-modify that do not target this inset
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 13 Jul 2020 14:14:21 +0000 (16:14 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 13 Jul 2020 14:15:42 +0000 (16:15 +0200)
Fixes #9214.

src/insets/InsetInfo.cpp

index 0847106dc01e3025c0997f13d2f0f0fdac076543..b23255aafea8e7e2b03cbceed6e77801397e1ad2 100644 (file)
@@ -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();