From fcc0624b742b5517f9057b61c6b979c8681eaea9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Mar 2020 07:13:19 +0530 Subject: [PATCH] Fix #1863438 [After adjusting the auto scroll speed I am jumped back in the book](https://bugs.launchpad.net/calibre/+bug/1863438) --- src/pyj/read_book/overlay.pyj | 2 +- src/pyj/read_book/view.pyj | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/overlay.pyj b/src/pyj/read_book/overlay.pyj index 84d6a91f8e..17b7d25aa6 100644 --- a/src/pyj/read_book/overlay.pyj +++ b/src/pyj/read_book/overlay.pyj @@ -463,7 +463,7 @@ class PrefsOverlay: # {{{ def on_hide(self): if self.changes_occurred: self.changes_occurred = False - ui_operations.redisplay_book() + self.overlay.view.preferences_changed() # }}} diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 62d06c9b5c..b42f9269d9 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -757,6 +757,10 @@ class View: show_controls_help() sd.set('controls_help_shown_count', c + 1) + def preferences_changed(self): + ui_operations.update_url_state(True) + ui_operations.redisplay_book() + def redisplay_book(self): # redisplay_book() is called when settings are changed sd = get_session_data()