From c01bf4fae4bcb3bd27d5eeb5cd40e91ab5c02809 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 24 Nov 2003 17:29:10 +0000 Subject: [PATCH] * text2.C (updateCounters): remove call to redoParagraph on changed labels as this is far too expensive. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8130 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 8 ++++++++ src/insets/ChangeLog | 2 +- src/text2.C | 11 +++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 96540e254d..944e385c1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ + +2003-11-24 André Pönitz + + * rowpainter.C: simplification + + * text2.C (updateCounters): remove call to redoParagraph on + changed labels as this is far too expensive. + 2003-11-24 Alfredo Braunstein * converter.C (convert): fix a crash: this function gets diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index c7e0ffaa3b..c46fd2c89e 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,5 +1,5 @@ -2003-11-17 André Pönitz +2003-11-24 André Pönitz * insettext.C (setViewCache): don't call LyXText::init() anymore diff --git a/src/text2.C b/src/text2.C index c32a0edf72..63bfd4f2bf 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1009,7 +1009,9 @@ void LyXText::setCounter(Buffer const & buf, ParagraphList::iterator pit) } -// Updates all counters. Paragraphs with changed label string will be rebroken +// Updates all counters. Paragraphs with changed label string will be +// not be rebroken as this is too expensive. The next round will get it +// right anyway... void LyXText::updateCounters() { // start over @@ -1018,8 +1020,6 @@ void LyXText::updateCounters() ParagraphList::iterator beg = ownerParagraphs().begin(); ParagraphList::iterator end = ownerParagraphs().end(); for (ParagraphList::iterator pit = beg; pit != end; ++pit) { - string const oldLabel = pit->params().labelString(); - size_t maxdepth = 0; if (pit != beg) maxdepth = boost::prior(pit)->getMaxDepthAfter(); @@ -1029,11 +1029,6 @@ void LyXText::updateCounters() // setCounter can potentially change the labelString. setCounter(*bv()->buffer(), pit); - - string const & newLabel = pit->params().labelString(); - - if (oldLabel != newLabel) - redoParagraph(pit); } } -- 2.39.5