don't die in editor if there's no current card

This commit is contained in:
Damien Elmes 2009-01-31 04:45:27 +09:00
parent fb4460c0ec
commit 8180996c16

View file

@ -236,7 +236,8 @@ class EditDeck(QMainWindow):
restoreSplitter(self.dialog.splitter, "editor")
self.show()
self.updateSearch()
self.currentCard = self.parent.currentCard
if self.parent.currentCard:
self.currentCard = self.parent.currentCard
self.focusCurrentCard()
def findCardInDeckModel(self, model, card):