]> git.lyx.org Git - features.git/commitdiff
Fix bug 8124. We enable LFUN_INSET_MODIFY in InsetBox if it
authorRichard Heck <rgheck@lyx.org>
Sat, 14 Apr 2012 21:32:25 +0000 (17:32 -0400)
committerRichard Heck <rgheck@lyx.org>
Wed, 2 May 2012 21:43:18 +0000 (17:43 -0400)
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
status.20x

index 4e00f87de04c3d91e400259935de062ca02ba6c7..08f950b3357d6787d532385aab727d60fe70198f 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);
index a09ba9e533c83c6f3ed66bfeddbc151b8024326c..f09f0132ff7de917269966f9dc4ba8e7c791f192 100644 (file)
@@ -122,6 +122,9 @@ What's new
 - Allow the <Enter> key to add a new branch in document settings.
   Only <Ctrl+Enter> and numpad-<Enter> will also close the dialog.
 
+- Box settings dialog didn't work if you were actually inside the box 
+  (bug 8124).
+
 - Fix tooltip for "Use Non-TeX Fonts" (bug 7787).
 
 - Fix pasting of LATIN CAPITAL LETTER SHARP S (bug 8057).