fix tap on word title will crash koreader

This commit is contained in:
chrox
2014-08-20 14:45:11 +08:00
parent 7b10d66e1b
commit 948d92a3b3
2 changed files with 4 additions and 2 deletions

View File

@@ -249,7 +249,9 @@ function UIManager:setDirty(widget, refresh_type)
if not refresh_type then
refresh_type = "auto"
end
self._dirty[widget] = refresh_type
if widget then
self._dirty[widget] = refresh_type
end
end
function UIManager:insertZMQ(zeromq)

View File

@@ -147,7 +147,7 @@ function Button:showHide(show)
end
function Button:onTapSelect()
if self.enabled then
if self.enabled and self.callback then
self[1].invert = true
UIManager:setDirty(self.show_parent, "partial")
UIManager:scheduleIn(0.1, function()