bug 806 change layout to default when deleting empty keepempty paragraphs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10219 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2005-07-15 16:27:06 +00:00
parent 41ecabf519
commit c95df1c147
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2005-07-15 <lgb@tandberg.net>
* text.C (backspace): bug 806 for empty keepempty paragraphs we
change the layout to default before letting DEPM do its thing.
* paragraph_funcs.C (breakParagraph): dont reset the layout on
keepEmpty paragraphs

View File

@ -1583,6 +1583,17 @@ void LyXText::backspace(LCursor & cur)
// handle the actual deletion of the paragraph.
if (cur.pit() != 0) {
// For KeepEmpty layouts we need to get
// rid of the keepEmpty setting first.
// And the only way to do this is to
// reset the layout to something
// else: f.ex. the default layout.
if (par.allowEmpty()) {
Buffer & buf = cur.buffer();
BufferParams const & bparams = buf.params();
par.layout(bparams.getLyXTextClass().defaultLayout());
}
cursorLeft(cur);
return;
}