It seems that the setPageMargins method will mess up XPointer of current view.
This bugfix simply disables page margin restoring in readercopt.lua so that
reading position is restorable.
pull/223/head
chrox 11 years ago
parent 4f30037953
commit 44c31afe62

@ -20,17 +20,20 @@ function ReaderCoptListener:onReadSettings(config)
end)
end
local copt_font_size = config:readSetting("copt_font_size")
local copt_font_size = config:readSetting("copt_font_size") or 22
if copt_font_size then
table.insert(self.ui.postInitCallback, function()
self.ui:handleEvent(Event:new("SetFontSize", copt_font_size))
self.ui.document:setFontSize(copt_font_size)
self.ui:handleEvent(Event:new("UpdatePos"))
end)
end
local copt_margins = config:readSetting("copt_page_margins")
if copt_margins then
table.insert(self.ui.postInitCallback, function()
self.ui:handleEvent(Event:new("SetPageMargins", copt_margins))
-- FIXME: SetPageMargins will mess up current reading position
-- for now we simply disable this feature.
--self.ui:handleEvent(Event:new("SetPageMargins", copt_margins))
end)
end
end

Loading…
Cancel
Save