Preserve the set of selected books in the library view when a device is connected

This commit is contained in:
Kovid Goyal 2011-10-26 09:57:27 +05:30
parent 90bec1f133
commit f86b414c47

View File

@ -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()
# }}} # }}}