mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
focus current profile
This commit is contained in:
parent
1051ba3e0b
commit
dfa0da5772
1 changed files with 7 additions and 2 deletions
|
@ -114,8 +114,13 @@ class AnkiQt(QMainWindow):
|
|||
def refreshProfilesList(self):
|
||||
f = self.profileForm
|
||||
f.profiles.clear()
|
||||
f.profiles.addItems(self.pm.profiles())
|
||||
f.profiles.setCurrentRow(0)
|
||||
profs = self.pm.profiles()
|
||||
f.profiles.addItems(profs)
|
||||
try:
|
||||
idx = profs.index(self.pm.name)
|
||||
except:
|
||||
idx = 0
|
||||
f.profiles.setCurrentRow(idx)
|
||||
|
||||
def onProfileRowChange(self, n):
|
||||
if n < 0:
|
||||
|
|
Loading…
Reference in a new issue