mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a parameter to control marking book as modified when calling apply_container_update_to_gui()
This commit is contained in:
parent
e294e6a679
commit
957bfeb841
@ -324,12 +324,18 @@ class Boss(QObject):
|
|||||||
container = current_container()
|
container = current_container()
|
||||||
self.gui.file_list.build(container)
|
self.gui.file_list.build(container)
|
||||||
|
|
||||||
def apply_container_update_to_gui(self):
|
def apply_container_update_to_gui(self, mark_as_modified=True):
|
||||||
' Update all the components of the user interface to reflect the latest data in the current book container '
|
'''
|
||||||
|
Update all the components of the user interface to reflect the latest data in the current book container.
|
||||||
|
|
||||||
|
:param mark_as_modified: If True, the book will be marked as modified, so the user will be prompted to save it
|
||||||
|
when quitting.
|
||||||
|
'''
|
||||||
self.refresh_file_list()
|
self.refresh_file_list()
|
||||||
self.update_global_history_actions()
|
self.update_global_history_actions()
|
||||||
self.update_editors_from_container()
|
self.update_editors_from_container()
|
||||||
self.set_modified()
|
if mark_as_modified:
|
||||||
|
self.set_modified()
|
||||||
self.gui.toc_view.update_if_visible()
|
self.gui.toc_view.update_if_visible()
|
||||||
|
|
||||||
@in_thread_job
|
@in_thread_job
|
||||||
|
Loading…
x
Reference in New Issue
Block a user