]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
Fix (again) bug #5754: Caption inset not dissolved when unsetting longtable caption...
[lyx.git] / src / insets / InsetTabular.cpp
index 7b13e010bcbfcbc9d6a8f7398b7f2c590541dcf7..611e29f01b5a9a691b3c76ada4d1a9d98822665a 100644 (file)
@@ -548,6 +548,7 @@ Tabular::CellData::CellData(CellData const & cs)
          p_width(cs.p_width),
          inset(dynamic_cast<InsetTableCell *>(cs.inset->clone()))
 {
+       inset->setBuffer(cs.inset->buffer());
 }
 
 Tabular::CellData & Tabular::CellData::operator=(CellData cs)
@@ -1797,9 +1798,10 @@ Tabular::idx_type Tabular::setLTCaption(row_type row, bool what)
                setRightLine(i, false);
        } else {
                unsetMultiColumn(i);
-               // FIXME: when unsetting a caption row, also all existing captions
-               // in this row must be dissolved, see (bug 5754)
-               // dispatch(FuncRequest(LFUN_INSET_DISSOLVE, "caption-insert"));
+               // When unsetting a caption row, also all existing
+               // captions in this row must be dissolved.
+               lyx::dispatch(FuncRequest(LFUN_LINE_BEGIN));
+               lyx::dispatch(FuncRequest(LFUN_INSET_DISSOLVE, "caption"));
        }
        row_info[row].caption = what;
        return i;