]> git.lyx.org Git - features.git/commitdiff
InsetBox.cpp: backport fix for bug #7849
authorUwe Stöhr <uwestoehr@web.de>
Tue, 25 Oct 2011 17:59:24 +0000 (17:59 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 25 Oct 2011 17:59:24 +0000 (17:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39969 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetBox.cpp
status.20x

index ec113744964695eaa25f40d5ad45a07e40c795cf..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);
@@ -309,7 +312,8 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
                os << "\\shadowbox{";
                break;
        case Shaded:
-               // later
+               // must be set later becaue e.g. the width settings only work when
+               // it is inside a minipage or parbox
                break;
        case Doublebox:
                os << "\\doublebox{";
index 1670f28ac01d583aa245a8e4f841182a752621c1..07fd81b76e0f41adc9c5c40b9bdb4db2db300d8d 100644 (file)
@@ -52,6 +52,8 @@ What's new
   text which is not explicitly marked in a different language, irrespective
   of the multilingual status, except for LTR<=>RTL changes.
 
+- disable impossible settings in context menu of boxes (bug 7849).
+
 - Augmented the tex2lyx --help message with the default paths (bug 6827).
 
 - New command-line switch -v (--version) for tex2lyx showing build information