Do not loose position in book list on device connection/sync, if a search is active. Fixes #908553 (Main window scrolls automatically to top upon completion of task)

This commit is contained in:
Kovid Goyal 2011-12-26 13:31:12 +05:30
parent 2c3fb10748
commit f2b0426445

View File

@ -51,8 +51,7 @@ class PreserveViewState(object): # {{{
traceback.print_exc()
def __exit__(self, *args):
current = self.view.get_selected_ids()
if not current and self.selected_ids:
if self.selected_ids:
if self.current_id is not None:
self.view.current_id = self.current_id
self.view.select_rows(self.selected_ids, using_ids=True,