mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
disable word OCR for now
Since it will crash the reader with a strange error message saying "terminate called after throwing an instance of 'DJVU::GException'" even though only PDF file is opened.
This commit is contained in:
@@ -12,7 +12,7 @@ end
|
||||
|
||||
function ReaderDictionary:onLookupWord(word)
|
||||
DEBUG("lookup word:", word)
|
||||
if self.lipc_handle then
|
||||
if self.lipc_handle and word then
|
||||
-- start indicator depends on pillow being enabled
|
||||
self.lipc_handle:set_string_property(
|
||||
"com.lab126.booklet.kpvbooklet.dict", "lookup", word)
|
||||
|
||||
@@ -81,7 +81,7 @@ function ReaderHighlight:onHold(arg, ges)
|
||||
word_box.y = word_box.y - math.floor(word_box.h * 0.02)
|
||||
word_box.w = word_box.w + math.floor(word_box.h * 0.04)
|
||||
word_box.h = word_box.h + math.floor(word_box.h * 0.04)
|
||||
local word = self.ui.document:getOCRWord(self.pos.page, word_box)
|
||||
-- local word = self.ui.document:getOCRWord(self.pos.page, word_box)
|
||||
DEBUG("OCRed word:", word)
|
||||
self.ui:handleEvent(Event:new("LookupWord", word))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user