don't die if last card deleted

This commit is contained in:
Damien Elmes 2009-01-10 19:39:15 +09:00
parent 4908ca96bc
commit 749bcad2fe

View file

@ -350,7 +350,7 @@ class EditDeck(QMainWindow):
else: else:
self.dialog.actionRedo.setEnabled(False) self.dialog.actionRedo.setEnabled(False)
# update list # update list
if self.currentRow: if self.currentRow and self.model.cards:
self.model.updateCard(self.currentRow) self.model.updateCard(self.currentRow)
def filterTextChanged(self): def filterTextChanged(self):