]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetBox.cpp
Try to fix bug 8124. We enable LFUN_INSET_MODIFY in InsetBox if it
[features.git] / src / insets / InsetBox.cpp
index ec48bd20b1184cf5904f8728b20d25382827d510..a396157caad575d7f8ca957d6a4f4ef8b637c263 100644 (file)
@@ -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);