]> git.lyx.org Git - features.git/commitdiff
InsetTabular.cpp: fix #7003 that I accidentally introduced when fixing #6958
authorUwe Stöhr <uwestoehr@web.de>
Mon, 1 Nov 2010 16:16:40 +0000 (16:16 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Mon, 1 Nov 2010 16:16:40 +0000 (16:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35966 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index 2029355e14d5cc3d5341be0aa9f5ead3910430c1..9d74f00d6ffb43a7cecf75b9aad105591ee3d5a3 100644 (file)
@@ -106,6 +106,8 @@ struct TabularFeature {
 
 TabularFeature tabularFeature[] =
 {
+       // the SET/UNSET actions are used by the table dialog,
+       // the TOGGLE actions by the table toolbar buttons
        { Tabular::APPEND_ROW, "append-row", false },
        { Tabular::APPEND_COLUMN, "append-column", false },
        { Tabular::DELETE_ROW, "delete-row", false },
@@ -116,7 +118,6 @@ TabularFeature tabularFeature[] =
        { Tabular::SET_LINE_BOTTOM, "set-line-bottom", true },
        { Tabular::SET_LINE_LEFT, "set-line-left", true },
        { Tabular::SET_LINE_RIGHT, "set-line-right", true },
-       //FIXME: get rid of those 4 TOGGLE actions in favor of the 4 above.
        { Tabular::TOGGLE_LINE_TOP, "toggle-line-top", false },
        { Tabular::TOGGLE_LINE_BOTTOM, "toggle-line-bottom", false },
        { Tabular::TOGGLE_LINE_LEFT, "toggle-line-left", false },
@@ -851,13 +852,14 @@ void Tabular::updateIndexes()
                for (col_type column = 0; column < ncols(); ++column) {
                        if (isPartOfMultiColumn(row, column))
                                continue;
-                       setFixedWidth(row, column);
-                       cell_info[row][column].inset->setContentAlignment(
-                               getAlignment(cellIndex(row, column)));
                        if (!isPartOfMultiRow(row, column)) {
                                columnofcell[i] = column;
                                rowofcell[i] = row;
-                       } else
+                       }
+                       setFixedWidth(row, column);
+                       cell_info[row][column].inset->setContentAlignment(
+                               getAlignment(cellIndex(row, column)));
+                       if (isPartOfMultiRow(row, column))
                                continue;
                        ++i;
                }