mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
41ecabf519
commit
c95df1c147
@ -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
|
||||
|
||||
|
11
src/text.C
11
src/text.C
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user