From 1458ac6a7ce42db0888981b9d822be81e2759a18 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 21 May 2009 12:45:31 +0000 Subject: [PATCH] Set flag for LFUN_MATH_MUTATE. Also, remove some 'ghost code' from InsetMathNest (if this had a purpose it should have been documented). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29764 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 8 +++++++- src/mathed/InsetMathNest.cpp | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 8035fb171b..b773b088c6 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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? diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 8c4bc3b089..c6e25b5994 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1254,10 +1254,6 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_FONT_DEFAULT: flag.setEnabled(true); break; - case LFUN_MATH_MUTATE: - //flag.setOnOff(mathcursor::formula()->hullType() == to_utf8(cmd.argument())); - flag.setOnOff(false); - break; // we just need to be in math mode to enable that case LFUN_MATH_SIZE: