]> git.lyx.org Git - features.git/commitdiff
Fix bug 5753: http://bugzilla.lyx.org/show_bug.cgi?id=5753.
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 10 Feb 2009 00:02:39 +0000 (00:02 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 10 Feb 2009 00:02:39 +0000 (00:02 +0000)
Crash when setting caption on a row with a multicolumn.

If there is already a multicolumn on the row, the number of cells is different from column_info.size().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28427 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index d1490f2df6545d83232f2c5404f47332bc7cc358..07eef6a3d9b2c33d8fe8c02aeb80cdfd3225cc46 100644 (file)
@@ -1745,7 +1745,7 @@ Tabular::idx_type Tabular::setLTCaption(row_type row, bool what)
 {
        idx_type i = getFirstCellInRow(row);
        if (what) {
-               setMultiColumn(i, column_info.size());
+               setMultiColumn(i, numberOfCellsInRow(i));
                setTopLine(i, false);
                setBottomLine(i, false);
                setLeftLine(i, false);