Michael Gerz wrote:
Abdel,
I have a few questions:
Log:
This commit fixes the singlePar optimization which was disabled due to
the ParagraphMetrics cleanup.
+ if (singlepar
+ // In Single Paragraph mode, rebreak only
+ // the (main text, not inset!) paragraph containing the cursor.
+ // (if this paragraph contains insets etc., rebreaking will
+ // recursively descend)
+ && tm.redoParagraph(cursor_.bottom().pit()))
+ singlepar = false;
Does this comment make sense here? AFAICS, we do not break the main text
(but bottom()).
bottom() returns the outermost slice which I think points to the main
text. This is what was used in the old code anyway (I just moved code
and comments) and it works fine.
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/ParagraphMetrics.C?rev=16543
==============================================================================
--- lyx-devel/trunk/src/ParagraphMetrics.C (original)
+++ lyx-devel/trunk/src/ParagraphMetrics.C Sat Jan 6 10:15:59 2007
+size_type ParagraphMetrics::calculateRowSignature(Row const & row)
+{
Are you sure that there is no longer a need to consider x,y and
row.width() in calculateRowSignature()?
Yes because a position change will trigger a full metrics change anyway.
I even think that this crc signature is too much and not needed.
Ideally, we should just verify beginning and end of row and verify that
the Paragraph contents has not changed.
Abdel.