mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
when removing a group should ensure there's an active one left
This commit is contained in:
parent
1ce5a7552e
commit
8be318d749
1 changed files with 3 additions and 0 deletions
|
@ -146,6 +146,9 @@ class GroupManager(object):
|
||||||
# delete the group and add a grave
|
# delete the group and add a grave
|
||||||
del self.groups[str(gid)]
|
del self.groups[str(gid)]
|
||||||
self.deck._logRem([gid], REM_GROUP)
|
self.deck._logRem([gid], REM_GROUP)
|
||||||
|
# ensure we have an active group
|
||||||
|
if gid in self.active():
|
||||||
|
self.select(int(self.groups.keys()[0]))
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def allNames(self):
|
def allNames(self):
|
||||||
|
|
Loading…
Reference in a new issue