From 5245f018a6c270a29530bc553ba65f128b70cafa Mon Sep 17 00:00:00 2001 From: Mahmoud Nagy Date: Sat, 6 Jan 2018 22:47:45 +0200 Subject: [PATCH] [fix] small skim problem (#3580) in relative page turning in skim, errors appear when page number is less than 10, and you press -10 in skim it gives warning and the page doesn't change, this happens in pdf. "update" method solves this if it comes first. --- frontend/apps/reader/skimtowidget.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/apps/reader/skimtowidget.lua b/frontend/apps/reader/skimtowidget.lua index 6ad130b04..588a84983 100644 --- a/frontend/apps/reader/skimtowidget.lua +++ b/frontend/apps/reader/skimtowidget.lua @@ -134,8 +134,8 @@ function SkimToWidget:init() show_parent = self, callback = function() self.curr_page = self.curr_page - 1 - self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) self:update() + self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) end, } local button_minus_ten = Button:new{ @@ -148,8 +148,8 @@ function SkimToWidget:init() show_parent = self, callback = function() self.curr_page = self.curr_page - 10 - self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) self:update() + self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) end, } local button_plus = Button:new{ @@ -162,8 +162,8 @@ function SkimToWidget:init() show_parent = self, callback = function() self.curr_page = self.curr_page + 1 - self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) self:update() + self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) end, } local button_plus_ten = Button:new{ @@ -176,8 +176,8 @@ function SkimToWidget:init() show_parent = self, callback = function() self.curr_page = self.curr_page + 10 - self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) self:update() + self.ui:handleEvent(Event:new("GotoPage", self.curr_page)) end, } self.current_page_text = Button:new{