mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
* 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
This commit is contained in:
parent
4bcfc9abe9
commit
c01bf4fae4
@ -1,3 +1,11 @@
|
||||
|
||||
2003-11-24 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* rowpainter.C: simplification
|
||||
|
||||
* text2.C (updateCounters): remove call to redoParagraph on
|
||||
changed labels as this is far too expensive.
|
||||
|
||||
2003-11-24 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
* converter.C (convert): fix a crash: this function gets
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
2003-11-17 André Pönitz <poenitz@gmx.net>
|
||||
2003-11-24 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* insettext.C (setViewCache): don't call LyXText::init() anymore
|
||||
|
||||
|
11
src/text2.C
11
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user