mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
fix multiple selection on ctrl+f
This commit is contained in:
parent
44b5b1670a
commit
d4004577f9
1 changed files with 4 additions and 1 deletions
|
@ -380,7 +380,10 @@ class EditDeck(QMainWindow):
|
|||
currentCardIndex = self.findCardInDeckModel(
|
||||
self.model, self.parent.currentCard)
|
||||
if currentCardIndex >= 0:
|
||||
self.dialog.tableView.selectRow(currentCardIndex)
|
||||
sm = self.dialog.tableView.selectionModel()
|
||||
sm.clear()
|
||||
sm.select(self.model.index(currentCardIndex, 0),
|
||||
QItemSelectionModel.Select | QItemSelectionModel.Rows)
|
||||
self.dialog.tableView.scrollTo(
|
||||
self.model.index(currentCardIndex,0),
|
||||
self.dialog.tableView.PositionAtTop)
|
||||
|
|
Loading…
Reference in a new issue