commit 60741c3d49cc462eacdcdd342ef523bf56089de7
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Jul 13 16:46:43 2020 +0200
InsetFloat: pass back inset-modify that is addressed to other inset
Fixes #9994
---
src/insets/InsetFloat.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp
index 4a812d0..1cd614e 100644
--- a/src/insets/InsetFloat.cpp
+++ b/src/insets/InsetFloat.cpp
@@ -162,6 +162,11 @@ void InsetFloat::doDispatch(Cursor & cur, FuncRequest &
cmd)
switch (cmd.action()) {
case LFUN_INSET_MODIFY: {
+ if
(!buffer().params().documentClass().floats().typeExist(cmd.getArg(0))) {
+ // not for us: pass further.
+ cur.undispatched();
+ break;
+ }
InsetFloatParams params;
string2params(to_utf8(cmd.argument()), params);
cur.recordUndoInset(this);
@@ -200,6 +205,9 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const
& cmd,
switch (cmd.action()) {
case LFUN_INSET_MODIFY:
+ if
(!buffer().params().documentClass().floats().typeExist(cmd.getArg(0)))
+ return Inset::getStatus(cur, cmd, flag);
+ // fall through
case LFUN_INSET_DIALOG_UPDATE:
flag.setEnabled(true);
return true;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs