]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.cpp
A little cleanup of the layout files.
[lyx.git] / src / mathed / InsetMathHull.cpp
index 31e0bb2880b5459e5fbd894dd9e6c9aa356b4807..b773b088c637a25884c938f94f35685ebe8ebc78 100644 (file)
@@ -1356,12 +1356,18 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_DOWN:
        case LFUN_NEWLINE_INSERT:
        case LFUN_MATH_EXTERN:
-       case LFUN_MATH_MUTATE:
        case LFUN_MATH_DISPLAY:
                // we handle these
                status.setEnabled(true);
                return true;
 
+       case LFUN_MATH_MUTATE: {
+               HullType ht = hullType(cmd.argument());
+               status.setOnOff(type_ == ht);
+               status.setEnabled(true);
+               return true;
+       }
+
        case LFUN_MATH_NUMBER_TOGGLE:
                // FIXME: what is the right test, this or the one of
                // LABEL_INSERT?
@@ -1374,10 +1380,10 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                // LABEL_INSERT?
                bool const enable = (type_ == hullMultline)
                        ? (nrows() - 1 == cur.row())
-                       : display() != Inline;
+                       : display() != Inline && nrows() > 1;
                row_type const r = (type_ == hullMultline) ? nrows() - 1 : cur.row();
                status.setEnabled(enable);
-               status.setOnOff(numbered(r));
+               status.setOnOff(enable && numbered(r));
                return true;
        }