From 77d7b0c68d1ae80fd9a3a77cb180ac48c47631f6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 29 Nov 2005 21:58:41 +0000 Subject: Fixed assertion where painting a rectangular selection led to multiple layouts being checked out of the cache. --- src/Editor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index ab7094112..21184d387 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2823,6 +2823,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //ElapsedTime et; if (lineDoc != lineDocPrevious) { ll.Set(0); + // For rectangular selection this accesses the layout cache so should be after layout returned. + lineIterator.SetAt(lineDoc); ll.Set(RetrieveLineLayout(lineDoc)); LayoutLine(lineDoc, surface, vs, ll, wrapWidth); lineDocPrevious = lineDoc; @@ -2834,7 +2836,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ll->selStart = SelectionStart(); ll->selEnd = SelectionEnd(); } else { - lineIterator.SetAt(lineDoc); ll->selStart = lineIterator.startPos; ll->selEnd = lineIterator.endPos; } -- cgit v1.2.3