always position selection in center after search
https://anki.tenderapp.com/discussions/beta-testing/1888-retaining-position-when-searching
This commit is contained in:
parent
6495240914
commit
c050833aba
@ -261,8 +261,6 @@ class DataModel(QAbstractTableModel):
|
|||||||
tv = self.browser.form.tableView
|
tv = self.browser.form.tableView
|
||||||
if idx:
|
if idx:
|
||||||
tv.selectRow(idx.row())
|
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
|
# we save and then restore the horizontal scroll position because
|
||||||
# scrollTo() also scrolls horizontally which is confusing
|
# scrollTo() also scrolls horizontally which is confusing
|
||||||
h = tv.horizontalScrollBar().value()
|
h = tv.horizontalScrollBar().value()
|
||||||
|
Loading…
Reference in New Issue
Block a user