always position selection in center after search

https://anki.tenderapp.com/discussions/beta-testing/1888-retaining-position-when-searching
This commit is contained in:
Damien Elmes 2020-04-01 11:01:20 +10:00
parent 6495240914
commit c050833aba

View File

@ -261,8 +261,6 @@ class DataModel(QAbstractTableModel):
tv = self.browser.form.tableView
if idx:
tv.selectRow(idx.row())
# scroll if the selection count has changed
if count != len(self.selectedCards):
# we save and then restore the horizontal scroll position because
# scrollTo() also scrolls horizontally which is confusing
h = tv.horizontalScrollBar().value()