From fdca464b96a00c3ad5593a277c2b311a37f17ee5 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 8 Mar 2012 00:11:30 +0100 Subject: [PATCH] don't pre-cache next page if we are going to modify bbox --- unireader.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unireader.lua b/unireader.lua index b0ee0ef1d..94cb1d3e9 100644 --- a/unireader.lua +++ b/unireader.lua @@ -406,8 +406,10 @@ function UniReader:goto(no) if no < self.doc:getPages() then if self.globalzoommode ~= self.ZOOM_BY_VALUE then - -- pre-cache next page - self:draworcache(no+1,self.globalzoommode,self.offset_x,self.offset_y,width,height,self.globalgamma,self.globalrotate) + if #self.bbox == 0 then + -- pre-cache next page, but if we will modify bbox don't! + self:draworcache(no+1,self.globalzoommode,self.offset_x,self.offset_y,width,height,self.globalgamma,self.globalrotate) + end else self:draworcache(no,self.globalzoom,self.offset_x,self.offset_y,width,height,self.globalgamma,self.globalrotate) end