mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
fix bug deleting current model in deck properties
This commit is contained in:
parent
ec80479de4
commit
595dce821b
1 changed files with 6 additions and 2 deletions
|
|
@ -114,8 +114,12 @@ class DeckProperties(QDialog):
|
|||
item = QListWidgetItem(name)
|
||||
self.dialog.modelsList.addItem(item)
|
||||
cm = self.d.currentModel
|
||||
try:
|
||||
if ankiqt.mw.currentCard:
|
||||
cm = ankiqt.mw.currentCard.fact.model
|
||||
except:
|
||||
# model has been deleted
|
||||
pass
|
||||
if model == cm:
|
||||
self.dialog.modelsList.setCurrentItem(item)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue