]> git.lyx.org Git - features.git/commitdiff
Fix bug #7007: Horizontal table alignment display broken.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 19 Nov 2010 03:31:13 +0000 (03:31 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 19 Nov 2010 03:31:13 +0000 (03:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36395 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index fc3afb3c3f8f009a9195e2b90e65fca68179083f..f01bdb50027fd262f163dfcbb34381827637ff3e 100644 (file)
@@ -1032,9 +1032,14 @@ void Tabular::setAlignment(idx_type cell, LyXAlignment align,
                docstring & dpoint = column_info[col].decimal_point;
                if (align == LYX_ALIGN_DECIMAL && dpoint.empty())
                        dpoint = from_utf8(lyxrc.default_decimal_point);
-       } else {
-               cellInfo(cell).alignment = align;
-               cellInset(cell).get()->setContentAlignment(align);
+       }
+       if (!onlycolumn) {
+               for (row_type r = 0; r < nrows(); ++r) {
+                       if (!isMultiRow(cellIndex(r, col))) {
+                               cell_info[r][col].alignment = align;
+                               cell_info[r][col].inset->setContentAlignment(align);
+                       }
+               }
        }
 }