mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
* InsetTabular.cpp: simplification; no change in functionality.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35902 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
317a3bdfe1
commit
40f06a50de
@ -5388,7 +5388,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
cur.setSelection(false);
|
||||
// When a row is set as caption, then also insert
|
||||
// If 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));
|
||||
@ -5407,21 +5407,10 @@ void InsetTabular::tabularFeatures(Cursor & cur,
|
||||
}
|
||||
|
||||
case Tabular::TOGGLE_LTCAPTION: {
|
||||
bool const set = !tabular.ltCaption(row);
|
||||
cur.idx() = tabular.setLTCaption(row, set);
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
cur.setSelection(false);
|
||||
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 {
|
||||
FuncRequest fr(LFUN_INSET_DISSOLVE, "caption");
|
||||
if (lyx::getStatus(fr).enabled())
|
||||
lyx::dispatch(fr);
|
||||
}
|
||||
if (tabular.ltCaption(row))
|
||||
tabularFeatures(cur, Tabular::UNSET_LTCAPTION);
|
||||
else
|
||||
tabularFeatures(cur, Tabular::SET_LTCAPTION);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user