This removes the paragraph rebreak on a changed label.

I understand that this should result in cosmetic errors, however, I am
not able to produce any. 

But even if there were some I wouldn't care:

Old:

-----------------------------------------------
                0.03   50.38       1/1 LyXText::init(BufferView*) [3]
[4]     93.6    0.03   50.38       1         LyXText::updateCounters() [4]
                0.00   49.35   11480/11480 
LyXText::redoParagraph(std::_List_iterator<Paragraph, Paragraph&, Paragraph*>) [5]
                0.02    1.00   22600/22600 LyXText::setCounter(Buffer const&, 
std::_List_iterator<Paragraph, Paragraph&, Paragraph*>) [39]
                0.01    0.00   22599/22599 Paragraph::getMaxDepthAfter() const [240]
                0.00    0.00   67800/1177024     Paragraph::params()
[193]
                0.00    0.00   22601/1245241     BufferView::buffer()
const [120]
                0.00    0.00   22601/233176      LyXText::bv() [267]
                0.00    0.00   36340/3445545 ParagraphParameters::depth() const [109]
                0.00    0.00       1/1           Counters::reset() [773]
                0.00    0.00       1/538239 BufferParams::getLyXTextClass() const [117]
                0.00    0.00       2/874658 LyXText::ownerParagraphs() const [299]
                0.00    0.00       1/1418614     Buffer::params() [189]
                0.00    0.00   45200/75326 ParagraphParameters::labelString() const 
[1134]
                0.00    0.00       1/29361 LyXTextClass::counters() const [11


New:

-----------------------------------------------
                0.01    0.87       1/1 LyXText::init(BufferView*) [14]
[37]     8.5    0.01    0.87       1         LyXText::updateCounters()
[37]
                0.00    0.87   22600/22600 LyXText::setCounter(Buffer const&, 
std::_List_iterator<Paragraph, Paragraph&, Paragraph*>) [39]
                0.00    0.00   22599/22599 Paragraph::getMaxDepthAfter() const [385]
                0.00    0.00   36340/2535036 ParagraphParameters::depth() const [96]
                0.00    0.00   22601/989008      BufferView::buffer()
const [163]
                0.00    0.00   22600/943662      Paragraph::params()
[270]
                0.00    0.00       1/440270 BufferParams::getLyXTextClass() const [111]
                0.00    0.00       2/680221 LyXText::ownerParagraphs() const [169]
                0.00    0.00   22601/182376      LyXText::bv() [1101]
                0.00    0.00       1/1207339     Buffer::params() [1082]
                0.00    0.00       1/29361 LyXTextClass::counters() const [1183]
                0.00    0.00       1/1           Counters::reset()
[3021]
-----------------------------------------------

[This is when loading 'UserGuide20.lyx', i.e. 20 copies of the UserGuide
contents in one doc]

Andre'



-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)
? .BufferView_pimpl.C.swp
? 1.diff
? 1.diff.gz
? 2.diff
? 3.diff
? ?t
? fullredraw.diff
? par-row.diff
? tabular-il.diff
? textcache.diff
? insets/1.diff
? mathed/cursor.diff
? support/1.diff
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.509
diff -u -p -r1.509 text2.C
--- text2.C     22 Nov 2003 14:44:56 -0000      1.509
+++ text2.C     24 Nov 2003 17:19:05 -0000
@@ -1009,7 +1009,9 @@ void LyXText::setCounter(Buffer const & 
 }
 
 
-// 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);
        }
 }
 

Reply via email to