]> git.lyx.org Git - lyx.git/commitdiff
InsetNote: pass on inset-modify lfuns addressed at other insets (#13068)
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 24 May 2024 12:19:18 +0000 (14:19 +0200)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 24 May 2024 14:46:01 +0000 (10:46 -0400)
(cherry picked from commit ae1ddcbda0615b742184f4263cd1ad550eb38c32)

src/insets/InsetNote.cpp

index b12b755fba9ed16e2a135c28a0286afb13720b81..b0e2b5f0cccc6e091cf69cbce9f80dae333b95ca 100644 (file)
@@ -141,6 +141,11 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
        switch (cmd.action()) {
 
        case LFUN_INSET_MODIFY: {
+               if (cmd.getArg(0) != "note") {
+                       // not for us; might be handled higher up
+                       cur.undispatched();
+                       return;
+               }
                // Do not do anything if converting to the same type of Note.
                // A quick break here is done instead of disabling the LFUN
                // because disabling the LFUN would lead to a greyed out
@@ -150,7 +155,7 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetNoteParams params;
                string2params(to_utf8(cmd.argument()), params);
                if (params_.type == params.type)
-                 break;
+                       break;
 
                cur.recordUndoInset(this);
                string2params(to_utf8(cmd.argument()), params_);