From fe25b8d8f643a0621bc97c7fb3b0219ef8287868 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 27 Jul 2018 17:29:00 +0530 Subject: [PATCH] Search functionality works --- src/calibre/gui2/tweak_book/preview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index a14bbb0571..9dda18dc76 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera # check if you can remove the restriction that prevents inspector dock from being undocked # check the context menu # check syncing of position back and forth -# check all butotns and search functionality in preview panel +# check all buttons in preview panel # rewrite JS from coffeescript to rapydscript # pass user stylesheet with css for split @@ -484,7 +484,7 @@ class Preview(QWidget): def find(self, direction): text = unicode_type(self.search.text()) - self.view.findText(text, QWebEnginePage.FindWrapsAroundDocument | ( + self.view._page.findText(text, ( QWebEnginePage.FindBackward if direction == 'prev' else QWebEnginePage.FindFlags(0))) def find_next(self):