mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 15:23:55 +02:00
...
This commit is contained in:
parent
226f444274
commit
b150851a58
2 changed files with 2 additions and 1 deletions
|
|
@ -719,7 +719,7 @@ def scroll_to_row(self, row):
|
|||
break
|
||||
|
||||
def set_current_row(self, row, select=True):
|
||||
if row > -1:
|
||||
if row > -1 and row < self.model().rowCount(QModelIndex()):
|
||||
h = self.horizontalHeader()
|
||||
logical_indices = list(range(h.count()))
|
||||
logical_indices = [x for x in logical_indices if not
|
||||
|
|
|
|||
|
|
@ -522,6 +522,7 @@ def library_moved(self, newloc, copy_structure=False, call_close=True):
|
|||
self.card_a_view.reset()
|
||||
self.card_b_view.reset()
|
||||
self.device_manager.set_current_library_uuid(db.library_id)
|
||||
self.library_view.set_current_row(0)
|
||||
# Run a garbage collection now so that it does not freeze the
|
||||
# interface later
|
||||
gc.collect()
|
||||
|
|
|
|||
Loading…
Reference in a new issue