backport r33088

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33314 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Edwin Leuven 2010-02-01 20:20:35 +00:00
parent c47af690de
commit 93b1b4b35e
2 changed files with 9 additions and 4 deletions

View File

@ -344,11 +344,13 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
DocumentClass const & tclass = cur.buffer().params().documentClass();
Layout const & layout = cpar.layout();
// this is only allowed, if the current paragraph is not empty
// or caption and if it has not the keepempty flag active
if (cur.lastpos() == 0 && !cpar.allowEmpty() &&
layout.labeltype != LABEL_SENSITIVE)
if (cur.lastpos() == 0 && !cpar.allowEmpty()) {
if (changeDepthAllowed(cur, DEC_DEPTH))
changeDepth(cur, DEC_DEPTH);
else
setLayout(cur, tclass.defaultLayoutName());
return;
}
// a layout change may affect also the following paragraph
recUndo(cur, cur.pit(), undoSpan(cur.pit()) - 1);

View File

@ -53,6 +53,9 @@ What's new
- Use a standard (rather than a wait) mouse cursor when displaying alerts.
- <Enter> in empty enumerations and other environments decreases depth if
possible and otherwise resets the layout to standard.
* DOCUMENTATION AND LOCALIZATION