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,11 +324,17 @@ class Boss(QObject):
|
||||
container = current_container()
|
||||
self.gui.file_list.build(container)
|
||||
|
||||
def apply_container_update_to_gui(self):
|
||||
' Update all the components of the user interface to reflect the latest data in the current book container '
|
||||
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.
|
||||
|
||||
: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.update_global_history_actions()
|
||||
self.update_editors_from_container()
|
||||
if mark_as_modified:
|
||||
self.set_modified()
|
||||
self.gui.toc_view.update_if_visible()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user