From: Abdelrazak Younes Date: Wed, 29 Aug 2007 21:33:11 +0000 (+0000) Subject: Enable use of Row::changed() X-Git-Tag: 1.6.10~8634 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8239945aa7c019639650cfcfd27ba66911b2f75d;p=features.git Enable use of Row::changed() * TextMetrics::redoParagraph(): crop the RowList if it is too big. * ParagraphMetrics::reset(): don't clear its RowList. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19897 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index deae1fdd95..65aedd2c1c 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -90,7 +90,6 @@ void ParagraphMetrics::reset(Paragraph const & par) { par_ = ∥ dim_ = Dimension(); - rows_.clear(); } diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 036af6327d..5bdd4c2755 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -259,6 +259,9 @@ bool TextMetrics::redoParagraph(pit_type const pit) pm.dim().des += dim.height(); } while (first < par.size()); + if (row_index < pm.rows().size()) + pm.rows().resize(row_index); + // Make sure that if a par ends in newline, there is one more row // under it if (first > 0 && par.isNewline(first - 1)) {