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
This commit is contained in:
Vincent van Ravesteijn 2009-05-21 12:45:31 +00:00
parent 571dc3626b
commit 1458ac6a7c
2 changed files with 7 additions and 5 deletions

View File

@ -1356,12 +1356,18 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_DOWN: case LFUN_DOWN:
case LFUN_NEWLINE_INSERT: case LFUN_NEWLINE_INSERT:
case LFUN_MATH_EXTERN: case LFUN_MATH_EXTERN:
case LFUN_MATH_MUTATE:
case LFUN_MATH_DISPLAY: case LFUN_MATH_DISPLAY:
// we handle these // we handle these
status.setEnabled(true); status.setEnabled(true);
return 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: case LFUN_MATH_NUMBER_TOGGLE:
// FIXME: what is the right test, this or the one of // FIXME: what is the right test, this or the one of
// LABEL_INSERT? // LABEL_INSERT?

View File

@ -1254,10 +1254,6 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_FONT_DEFAULT: case LFUN_FONT_DEFAULT:
flag.setEnabled(true); flag.setEnabled(true);
break; 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 // we just need to be in math mode to enable that
case LFUN_MATH_SIZE: case LFUN_MATH_SIZE: