From 4d187aad4ee49a20254048ca301119176b54039b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 30 Sep 2012 16:15:33 +0200 Subject: [PATCH] don't preCache in two column mode This also cleanups code to make it easier to follow chaning logic a bit to generate useful Debug messages --- unireader.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unireader.lua b/unireader.lua index 20e740b26..00acbc6d2 100644 --- a/unireader.lua +++ b/unireader.lua @@ -1528,8 +1528,12 @@ function UniReader:goto(no, is_ignore_jump) -- TODO: move the following to a more appropriate place -- into the caching section if no < self.doc:getPages() then - if #self.bbox == 0 or not self.bbox.enabled then - -- pre-cache next page, but if we will modify bbox don't! + if self.bbox.enabled and #self.bbox > 0 then + Debug("no preCache -- using custom bbox") + elseif self.pan_by_page then + Debug("no preCache -- in two column mode") + else + Debug("preCache", no+1) self:drawOrCache(no+1, true) end end