mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Preserve the set of selected books in the library view when a device is connected
This commit is contained in:
parent
90bec1f133
commit
f86b414c47
@ -850,15 +850,16 @@ class DeviceMixin(object): # {{{
|
|||||||
self.refresh_ondevice()
|
self.refresh_ondevice()
|
||||||
device_signals.device_metadata_available.emit()
|
device_signals.device_metadata_available.emit()
|
||||||
|
|
||||||
def refresh_ondevice(self, reset_only = False):
|
def refresh_ondevice(self, reset_only=False):
|
||||||
'''
|
'''
|
||||||
Force the library view to refresh, taking into consideration new
|
Force the library view to refresh, taking into consideration new
|
||||||
device books information
|
device books information
|
||||||
'''
|
'''
|
||||||
self.book_on_device(None, reset=True)
|
with self.library_view.preserve_selected_books:
|
||||||
if reset_only:
|
self.book_on_device(None, reset=True)
|
||||||
return
|
if reset_only:
|
||||||
self.library_view.model().refresh_ondevice()
|
return
|
||||||
|
self.library_view.model().refresh_ondevice()
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user