disable math functions in places like ERT insets (bug 5703)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28321 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-02-02 13:42:07 +00:00
parent a776656636
commit b1996016e0

View File

@ -2241,6 +2241,14 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
enable = !inDescriptionItem(cur);
break;
case LFUN_MATH_INSERT:
case LFUN_MATH_MATRIX:
case LFUN_MATH_DELIM:
case LFUN_MATH_BIGDELIM:
// not allowed in ERT, for example.
enable = cur.inset().insetAllowed(MATH_CODE);
break;
case LFUN_WORD_DELETE_FORWARD:
case LFUN_WORD_DELETE_BACKWARD:
case LFUN_LINE_DELETE:
@ -2292,10 +2300,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_MATH_DISPLAY:
case LFUN_MATH_MODE:
case LFUN_MATH_MACRO:
case LFUN_MATH_MATRIX:
case LFUN_MATH_DELIM:
case LFUN_MATH_BIGDELIM:
case LFUN_MATH_INSERT:
case LFUN_MATH_SUBSCRIPT:
case LFUN_MATH_SUPERSCRIPT:
case LFUN_FONT_DEFAULT: