mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
Some improvements for the math context menu:
- hide "Number this line" for single line equations, - set flag for LFUN_MATH_MUTATE. see r29762 and r29764. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30906 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
75e66e9d4c
commit
7fd27c3b81
@ -1334,12 +1334,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?
|
||||||
@ -1350,11 +1356,12 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case LFUN_MATH_NUMBER_LINE_TOGGLE: {
|
case LFUN_MATH_NUMBER_LINE_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?
|
||||||
bool const enable = (type_ == hullMultline) ?
|
bool const enable = (type_ == hullMultline)
|
||||||
(nrows() - 1 == cur.row()) : display();
|
? (nrows() - 1 == cur.row())
|
||||||
|
: (display() != Inline && nrows() > 1);
|
||||||
row_type const r = (type_ == hullMultline) ? nrows() - 1 : cur.row();
|
row_type const r = (type_ == hullMultline) ? nrows() - 1 : cur.row();
|
||||||
status.setEnabled(enable);
|
status.setEnabled(enable);
|
||||||
status.setOnOff(numbered(r));
|
status.setOnOff(enable && numbered(r));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1234,10 +1234,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:
|
||||||
|
@ -66,6 +66,8 @@ What's new
|
|||||||
|
|
||||||
- Math context menu has a new item for numbering a single line in a formula.
|
- Math context menu has a new item for numbering a single line in a formula.
|
||||||
|
|
||||||
|
- Math context menu has now a status flag indicating the type of equation.
|
||||||
|
|
||||||
- Some context menu items haven been revised.
|
- Some context menu items haven been revised.
|
||||||
|
|
||||||
- Include inset context menu shows with a checkbox what is the current
|
- Include inset context menu shows with a checkbox what is the current
|
||||||
|
Loading…
Reference in New Issue
Block a user