mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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):
|
def refreshProfilesList(self):
|
||||||
f = self.profileForm
|
f = self.profileForm
|
||||||
f.profiles.clear()
|
f.profiles.clear()
|
||||||
f.profiles.addItems(self.pm.profiles())
|
profs = self.pm.profiles()
|
||||||
f.profiles.setCurrentRow(0)
|
f.profiles.addItems(profs)
|
||||||
|
try:
|
||||||
|
idx = profs.index(self.pm.name)
|
||||||
|
except:
|
||||||
|
idx = 0
|
||||||
|
f.profiles.setCurrentRow(idx)
|
||||||
|
|
||||||
def onProfileRowChange(self, n):
|
def onProfileRowChange(self, n):
|
||||||
if n < 0:
|
if n < 0:
|
||||||
|
|
Loading…
Reference in a new issue