]> git.lyx.org Git - features.git/commitdiff
Fix bug 5750: http://bugzilla.lyx.org/show_bug.cgi?id=5750.
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 9 Feb 2009 09:02:50 +0000 (09:02 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 9 Feb 2009 09:02:50 +0000 (09:02 +0000)
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

src/insets/InsetTabular.cpp

index e644b90fc8802fc59f239c1657b6f7ed17f188a4..fdd4d3685b2f9c9dd9aed3040ef941fe1bf15935 100644 (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;
 }