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

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28318 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-02-02 11:27:30 +00:00
parent 85a230c62c
commit 9adde5af52

View File

@ -2286,6 +2286,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:
@ -2337,10 +2345,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: