Move the contents of a row into the caption when setting a row as a longtable caption.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32156 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-11-22 18:39:48 +00:00
parent e4f66e1032
commit f961b60575

View File

@ -4888,11 +4888,12 @@ void InsetTabular::tabularFeatures(Cursor & cur,
cur.pos() = 0;
cur.setSelection(false);
if (set)
if (set) {
// When a row is set as caption, then also insert
// a caption. Otherwise the LaTeX output is broken.
lyx::dispatch(FuncRequest(LFUN_INSET_SELECT_ALL));
lyx::dispatch(FuncRequest(LFUN_CAPTION_INSERT));
else {
} else {
FuncRequest fr(LFUN_INSET_DISSOLVE, "caption");
if (lyx::getStatus(fr).enabled())
lyx::dispatch(fr);