Wrong width display of multicolumn cells.

When changing a custom width cell into a multicolumn, the isFixedWidth bool should be set to false. Now, the function setFixedWidth could only set isFixedWidth to true when needed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28407 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-02-09 09:02:50 +00:00
parent ff12fcb01b
commit 96eac2ca3f

View File

@ -1022,12 +1022,10 @@ void Tabular::setColumnPWidth(Cursor & cur, idx_type cell,
bool Tabular::setFixedWidth(row_type r, col_type c)
{
bool const multicol = cell_info[r][c].multicolumn != CELL_NORMAL;
if ((!column_info[c].p_width.zero() && !multicol)
|| (multicol && !cell_info[r][c].p_width.zero())) {
cell_info[r][c].inset->toggleFixedWidth(true);
return true;
}
return false;
bool const fixed_width = (!column_info[c].p_width.zero() && !multicol)
|| (multicol && !cell_info[r][c].p_width.zero());
cell_info[r][c].inset->toggleFixedWidth(fixed_width);
return fixed_width;
}