mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-19 05:53:35 +00:00
backport r33615: fix bug that LyX allowed to specify the vertical alignment of table columns without a fixed width
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33685 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
76d3278183
commit
5322561dcd
@ -1000,6 +1000,11 @@ void Tabular::setColumnPWidth(Cursor & cur, idx_type cell,
|
|||||||
col_type const j = cellColumn(cell);
|
col_type const j = cellColumn(cell);
|
||||||
|
|
||||||
column_info[j].p_width = width;
|
column_info[j].p_width = width;
|
||||||
|
// reset the vertical alignment to top if the fixed with
|
||||||
|
// is removed or zero because only fixed width columns can
|
||||||
|
// have a vertical alignment
|
||||||
|
if (column_info[j].p_width.zero())
|
||||||
|
column_info[j].valignment = LYX_VALIGN_TOP;
|
||||||
for (row_type i = 0; i < row_info.size(); ++i) {
|
for (row_type i = 0; i < row_info.size(); ++i) {
|
||||||
idx_type const cell = cellIndex(i, j);
|
idx_type const cell = cellIndex(i, j);
|
||||||
// because of multicolumns
|
// because of multicolumns
|
||||||
@ -3854,6 +3859,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case Tabular::M_VALIGN_TOP:
|
case Tabular::M_VALIGN_TOP:
|
||||||
flag = false;
|
flag = false;
|
||||||
case Tabular::VALIGN_TOP:
|
case Tabular::VALIGN_TOP:
|
||||||
|
status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
|
||||||
status.setOnOff(
|
status.setOnOff(
|
||||||
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_TOP);
|
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_TOP);
|
||||||
break;
|
break;
|
||||||
@ -3861,6 +3867,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case Tabular::M_VALIGN_BOTTOM:
|
case Tabular::M_VALIGN_BOTTOM:
|
||||||
flag = false;
|
flag = false;
|
||||||
case Tabular::VALIGN_BOTTOM:
|
case Tabular::VALIGN_BOTTOM:
|
||||||
|
status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
|
||||||
status.setOnOff(
|
status.setOnOff(
|
||||||
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_BOTTOM);
|
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_BOTTOM);
|
||||||
break;
|
break;
|
||||||
@ -3868,6 +3875,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case Tabular::M_VALIGN_MIDDLE:
|
case Tabular::M_VALIGN_MIDDLE:
|
||||||
flag = false;
|
flag = false;
|
||||||
case Tabular::VALIGN_MIDDLE:
|
case Tabular::VALIGN_MIDDLE:
|
||||||
|
status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
|
||||||
status.setOnOff(
|
status.setOnOff(
|
||||||
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_MIDDLE);
|
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_MIDDLE);
|
||||||
break;
|
break;
|
||||||
|
@ -176,6 +176,9 @@ What's new
|
|||||||
|
|
||||||
- Detect user-specified package dependencies for modules (bug 6361).
|
- Detect user-specified package dependencies for modules (bug 6361).
|
||||||
|
|
||||||
|
- Fix bug that LyX allowed to specify the vertical alignment of table
|
||||||
|
columns without a fixed width.
|
||||||
|
|
||||||
- Prevent the error dialog from jumping to the first item when
|
- Prevent the error dialog from jumping to the first item when
|
||||||
clicking outside the dialog (bug 2179).
|
clicking outside the dialog (bug 2179).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user