From c50a5e989781aea02dd267bd564ac134176af38b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 15 Sep 2006 09:37:33 +0000 Subject: [PATCH] * paragraph_funcs.C (breakParagraph): make sure to respect nesting when depth > 0 (bug 2445)/ git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15001 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/paragraph_funcs.C | 7 +++++++ status.14x | 2 ++ 3 files changed, 14 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index cdd8f05c62..25a005299a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-09-15 Jean-Marc Lasgouttes + + * paragraph_funcs.C (breakParagraph): make sure to respect nesting + when depth > 0 (bug 2445)/ + 2006-09-14 Jürgen Spitzmüller * src/text3.C (doInsertInset): reset first paragraph to default diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index c18169af5b..e5fdf2d8ac 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -120,6 +120,13 @@ void breakParagraph(BufferParams const & bparams, if (flag) { tmp->layout(par.layout()); tmp->setLabelWidthString(par.params().labelWidthString()); + tmp->params().depth(par.params().depth()); + } else if (par.params().depth() > 0) { + Paragraph const & hook = pars[outerHook(par_offset, pars)]; + tmp->layout(hook.layout()); + // not sure the line below is useful + tmp->setLabelWidthString(par.params().labelWidthString()); + tmp->params().depth(hook.params().depth()); } bool const isempty = (par.allowEmpty() && par.empty()); diff --git a/status.14x b/status.14x index 69f061c74e..46c1a16285 100644 --- a/status.14x +++ b/status.14x @@ -93,6 +93,8 @@ What's new - Fix a crash when the cursor is in an empty script and the user clicks in the text. +- Do not reset environment depth when breaking a paragraph (bug 2445). + - Handle properly script insets which the nucleus has more than one element (like {a'}^{2}).