mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix annots disappearing on settings change
This commit is contained in:
parent
d053dc26ea
commit
87ca655075
@ -772,7 +772,7 @@ class View:
|
|||||||
cfi = '/' + rest
|
cfi = '/' + rest
|
||||||
return name, cfi
|
return name, cfi
|
||||||
|
|
||||||
def display_book(self, book, initial_position):
|
def display_book(self, book, initial_position, is_redisplay):
|
||||||
self.hide_overlays()
|
self.hide_overlays()
|
||||||
self.iframe.focus()
|
self.iframe.focus()
|
||||||
is_current_book = self.book and self.book.key == book.key
|
is_current_book = self.book and self.book.key == book.key
|
||||||
@ -786,6 +786,7 @@ class View:
|
|||||||
unkey = username_key(get_interface_data().username)
|
unkey = username_key(get_interface_data().username)
|
||||||
self.book = current_book.book = book
|
self.book = current_book.book = book
|
||||||
hl = None
|
hl = None
|
||||||
|
if not is_redisplay:
|
||||||
if runtime.is_standalone_viewer:
|
if runtime.is_standalone_viewer:
|
||||||
hl = book.highlights
|
hl = book.highlights
|
||||||
v'delete book.highlights'
|
v'delete book.highlights'
|
||||||
@ -842,7 +843,7 @@ class View:
|
|||||||
if ui_operations.export_shortcut_map:
|
if ui_operations.export_shortcut_map:
|
||||||
ui_operations.export_shortcut_map(self.keyboard_shortcut_map)
|
ui_operations.export_shortcut_map(self.keyboard_shortcut_map)
|
||||||
self.book_scrollbar.apply_visibility()
|
self.book_scrollbar.apply_visibility()
|
||||||
self.display_book(self.book)
|
self.display_book(self.book, None, True)
|
||||||
|
|
||||||
def iframe_settings(self, name):
|
def iframe_settings(self, name):
|
||||||
sd = get_session_data()
|
sd = get_session_data()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user