]> git.lyx.org Git - features.git/commitdiff
InsetBox.cpp: fix bug #7849 (with help from Jürgen)
authorUwe Stöhr <uwestoehr@web.de>
Mon, 24 Oct 2011 17:32:29 +0000 (17:32 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Mon, 24 Oct 2011 17:32:29 +0000 (17:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39956 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetBox.cpp

index 38c864ccbc2402170fea0429d98f28b2f507c01a..ccd1d12107123e332696d460ef15a788d44a18fb 100644 (file)
@@ -212,10 +212,13 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action()) {
 
        case LFUN_INSET_MODIFY:
-               if (cmd.getArg(0) == "changetype")
-                       flag.setOnOff(cmd.getArg(1) == params_.type);
-               flag.setEnabled(true);
-               return true;
+               if (cmd.getArg(0) == "changetype") {
+                       string const type = cmd.getArg(1);
+                       flag.setOnOff(type == params_.type);
+                       flag.setEnabled(!params_.inner_box || type != "Framed");
+                       return true;
+               }
+               return InsetCollapsable::getStatus(cur, cmd, flag);
 
        case LFUN_INSET_DIALOG_UPDATE:
                flag.setEnabled(true);