From f84eb64ac7bdd73cc5abace2f836091b0defa21c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 14 Apr 2012 17:32:25 -0400 Subject: [PATCH] Try to fix bug 8124. We enable LFUN_INSET_MODIFY in InsetBox if it is intended for us, i.e., if the first argument is "box". Maybe we should also check to make sure that the rest of the arguments are good, but we used just to return true no matter what the argument was, so this is an improvement. LFUN_INSET_MODIFY is really kind of a mess. --- src/insets/InsetBox.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index ec48bd20b1..a396157caa 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -211,14 +211,20 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd, { switch (cmd.action()) { - case LFUN_INSET_MODIFY: - if (cmd.getArg(0) == "changetype") { + case LFUN_INSET_MODIFY: { + string const first_arg = cmd.getArg(0); + if (first_arg == "changetype") { string const type = cmd.getArg(1); flag.setOnOff(type == params_.type); flag.setEnabled(!params_.inner_box || type != "Framed"); return true; } + if (first_arg == "box") { + flag.setEnabled(true); + return true; + } return InsetCollapsable::getStatus(cur, cmd, flag); + } case LFUN_INSET_DIALOG_UPDATE: flag.setEnabled(true); -- 2.39.2