singlePar with non wide inset optimization.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20567 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-28 12:22:11 +00:00
parent f22624442d
commit 39cd77bee0
2 changed files with 12 additions and 3 deletions

View File

@ -1482,13 +1482,19 @@ void BufferView::updateMetrics(bool singlepar)
// If the paragraph metrics has changed, we can not
// use the singlepar optimisation.
if (singlepar
if (singlepar) {
pit_type const bottom_pit = cursor_.bottom().pit();
int old_height = tm.parMetrics(bottom_pit).height();
// 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;
tm.redoParagraph(bottom_pit);
// Paragraph height has changed so we cannot proceed to
// the singlePar optimisation.
if (tm.parMetrics(bottom_pit).height() != old_height)
singlepar = false;
}
pit_type const pit = anchor_ref_;
int pit1 = pit;

View File

@ -47,6 +47,9 @@ What's new
- Add a pixmap cache to speed up text drawing on screen. This cache is
enabled on Mac and Windows platforms using Qt 4.2 or higher.
- Add an optimization that avoids a full screen drawing when typing in a
non-wide inset.
- Add a "Save all" menu entry, to save all modified files (bug 2840).