mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't die when deleting last card in card layout
This commit is contained in:
parent
a5ca6a90b0
commit
b8d627cd3f
1 changed files with 2 additions and 0 deletions
|
@ -140,6 +140,8 @@ Please create a new card first."""))
|
|||
if self.redrawing:
|
||||
return
|
||||
self.ord = idx
|
||||
if idx >= len(self.cards):
|
||||
idx = len(self.cards) - 1
|
||||
self.card = self.cards[idx]
|
||||
self.tab = self.forms[idx]
|
||||
self.tabs.setCurrentIndex(idx)
|
||||
|
|
Loading…
Reference in a new issue