mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Disable valign widget in tabularx tables
See https://marc.info/?l=lyx-users&m=172363857509065&w=2
This commit is contained in:
parent
6b0c243cda
commit
c993485782
@ -267,7 +267,8 @@ void GuiTabular::enableWidgets() const
|
||||
bool const enable_valign =
|
||||
!multirowCB->isChecked()
|
||||
&& !widgetsToLength(columnWidthED, columnWidthUnitLC).empty()
|
||||
&& specialAlignmentED->text().isEmpty();
|
||||
&& specialAlignmentED->text().isEmpty()
|
||||
&& funcEnabled(Tabular::VALIGN_BOTTOM);
|
||||
vAlignCO->setEnabled(enable_valign);
|
||||
vAlignLA->setEnabled(enable_valign);
|
||||
|
||||
|
@ -5683,6 +5683,7 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
|
||||
col_type sel_col_end = 0;
|
||||
Tabular::ltType dummyltt;
|
||||
bool flag = true;
|
||||
bool const tabularx = tabular.hasVarwidthColumn();
|
||||
|
||||
getSelection(cur, sel_row_start, sel_row_end, sel_col_start, sel_col_end);
|
||||
|
||||
@ -5958,7 +5959,8 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
|
||||
flag = false;
|
||||
// fall through
|
||||
case Tabular::VALIGN_BOTTOM:
|
||||
status.setEnabled((!tabular.getPWidth(cur.idx()).zero()
|
||||
status.setEnabled(!tabularx
|
||||
&& (!tabular.getPWidth(cur.idx()).zero()
|
||||
|| tabular.getUsebox(cur.idx()) == Tabular::BOX_VARWIDTH));
|
||||
status.setOnOff(
|
||||
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_BOTTOM);
|
||||
@ -5968,7 +5970,8 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
|
||||
flag = false;
|
||||
// fall through
|
||||
case Tabular::VALIGN_MIDDLE:
|
||||
status.setEnabled((!tabular.getPWidth(cur.idx()).zero()
|
||||
status.setEnabled(!tabularx
|
||||
&& (!tabular.getPWidth(cur.idx()).zero()
|
||||
|| tabular.getUsebox(cur.idx()) == Tabular::BOX_VARWIDTH));
|
||||
status.setOnOff(
|
||||
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_MIDDLE);
|
||||
|
Loading…
Reference in New Issue
Block a user