branch: Fix bug #5754: Caption inset not dissolved when unsetting longtable caption.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32154 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-11-22 18:35:36 +00:00
parent bd5efd7b53
commit fe6a944bdd
2 changed files with 11 additions and 7 deletions

View File

@ -1744,12 +1744,9 @@ Tabular::idx_type Tabular::setLTCaption(row_type row, bool what)
setBottomLine(i, false);
setLeftLine(i, false);
setRightLine(i, false);
} else {
} 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"));
}
row_info[row].caption = what;
return i;
}
@ -4719,10 +4716,15 @@ void InsetTabular::tabularFeatures(Cursor & cur,
cur.pit() = 0;
cur.pos() = 0;
cur.setSelection(false);
// When a row is set as caption, then also insert a caption. Otherwise
// the LaTeX output is broken, when the user doesn't add a caption.
if (set)
// When a row is set as caption, then also insert
// a caption. Otherwise the LaTeX output is broken.
lyx::dispatch(FuncRequest(LFUN_CAPTION_INSERT));
else {
FuncRequest fr(LFUN_INSET_DISSOLVE);
if (lyx::getStatus(fr).enabled())
lyx::dispatch(fr);
}
break;
}

View File

@ -315,6 +315,8 @@ What's new
- Allow PgUp and PgDown to position the cursor on the first or last row.
- Dissolve the caption when unsetting a longtable caption row (bug 5754).
* DOCUMENTATION AND LOCALIZATION