From b18af238981b8fa045019fdaa9dc6be02a714bc2 Mon Sep 17 00:00:00 2001 From: Nikolay Pultsin Date: Thu, 13 Dec 2012 01:41:02 +0400 Subject: [PATCH] fixed backward scrolling with no animation --- ChangeLog | 1 + src/org/geometerplus/zlibrary/text/view/ZLTextView.java | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4f9420f1..72aae38c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Added Bulgarian translation (by Ники Арсов) * Updated Dutch translation (by Frank Fesevur) * Plural forms in Belarusian and Czech translations +* Fixed issue with rendering during backward page turning with no amimation ===== 1.6.8 (Nov 30, 2012) ===== * Fixed NPE during adding a custom catalog with no search link diff --git a/src/org/geometerplus/zlibrary/text/view/ZLTextView.java b/src/org/geometerplus/zlibrary/text/view/ZLTextView.java index f8cb67e57..6c9e916dc 100644 --- a/src/org/geometerplus/zlibrary/text/view/ZLTextView.java +++ b/src/org/geometerplus/zlibrary/text/view/ZLTextView.java @@ -1245,6 +1245,7 @@ public abstract class ZLTextView extends ZLTextViewBase { if (page.PaintState == PaintStateEnum.NOTHING_TO_PAINT || page.PaintState == PaintStateEnum.READY) { return; } + final int oldState = page.PaintState; final HashMap cache = myLineInfoCache; for (ZLTextLineInfo info : page.LineInfos) { @@ -1344,8 +1345,12 @@ public abstract class ZLTextView extends ZLTextViewBase { myLineInfoCache.clear(); if (page == myCurrentPage) { - myPreviousPage.reset(); - myNextPage.reset(); + if (oldState != PaintStateEnum.START_IS_KNOWN) { + myPreviousPage.reset(); + } + if (oldState != PaintStateEnum.END_IS_KNOWN) { + myNextPage.reset(); + } } }