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);
break; // the character couldn't be deleted physically due to change tracking
}
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
// A singlePar update is not enough in this case.
cur.updateFlags(Update::Force);
cur.clearSelection();
setCursorIntern(cur, begPit, begPos);
cur.updateFlags(Update::Force);
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
}
cur.recordUndo(ATOMIC_UNDO, prevcur.pit());
mergeParagraph(bufparams, cur.text()->paragraphs(),
prevcur.pit());
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
setCursorIntern(cur, prevcur.pit(), prevcur.pos());
cur.updateFlags(Update::Force);
return true;
cur.top().forwardPos();
if (was_inset)
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
else
cur.checkBufferStructure();
needsUpdate = true;
}
if (needsUpdate) {
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
setCursorIntern(cur, prevcur.pit(), prevcur.pos());
}
bool const was_inset = cur.paragraph().isInset(cur.pos());
cur.paragraph().eraseChar(cur.pos(), cur.buffer()->params().trackChanges);
if (was_inset)
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
else
cur.checkBufferStructure();
}
} else
// this is the least that needs to be done (bug 6003)
// in the above case, pasteParagraphList handles this
- cur.buffer()->updateLabels();
+ cur.buffer()->updateBuffer();
// Ensure the current language is set correctly (bug 6292)
cur.text()->setCursor(cur, cur.pit(), cur.pos());