mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
In math matrices, make sure that only the align-type tablar-feature can get a check box in menus (with some themes, empty check boxes are visible)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28703 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7bd971ff32
commit
f24870ea9b
@ -1405,8 +1405,18 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
if (s == "valign-top" || s == "valign-middle" ||
|
||||
s == "valign-bottom" || s == "align-left" ||
|
||||
s == "align-right" || s == "align-center" ||
|
||||
s == "append-row" || s == "delete-row" ||
|
||||
s == "align-right" || s == "align-center") {
|
||||
status.setEnabled(true);
|
||||
char const ha = horizontalAlignment(cur.col());
|
||||
char const va = verticalAlignment();
|
||||
status.setOnOff((s == "align-left" && ha == 'l')
|
||||
|| (s == "align-right" && ha == 'r')
|
||||
|| (s == "align-center" && ha == 'c')
|
||||
|| (s == "valign-top" && va == 't')
|
||||
|| (s == "valign-bottom" && va == 'b')
|
||||
|| (s == "valign-middle" && va == 'm'));
|
||||
}
|
||||
if (s == "append-row" || s == "delete-row" ||
|
||||
s == "copy-row" || s == "swap-row" ||
|
||||
s == "add-hline-above" || s == "add-hline-below" ||
|
||||
s == "delete-hline-above" || s == "delete-hline-below" ||
|
||||
@ -1421,15 +1431,6 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
from_utf8(N_("Unknown tabular feature '%1$s'")), lyx::from_ascii(s)));
|
||||
}
|
||||
|
||||
char const ha = horizontalAlignment(cur.col());
|
||||
char const va = verticalAlignment();
|
||||
status.setOnOff((s == "align-left" && ha == 'l')
|
||||
|| (s == "align-right" && ha == 'r')
|
||||
|| (s == "align-center" && ha == 'c')
|
||||
|| (s == "valign-top" && va == 't')
|
||||
|| (s == "valign-bottom" && va == 'b')
|
||||
|| (s == "valign-middle" && va == 'm'));
|
||||
|
||||
#if 0
|
||||
// FIXME: What did this code do?
|
||||
// Please check whether it is still needed!
|
||||
|
Loading…
Reference in New Issue
Block a user