From df3d2b854479073094aa308607e07f7891a426b4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 23 Oct 2012 16:15:34 +0900 Subject: [PATCH] be tolerant of conf id being set to string by mobile clients --- aqt/deckconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/deckconf.py b/aqt/deckconf.py index f47ed9d50..fbd0dce04 100644 --- a/aqt/deckconf.py +++ b/aqt/deckconf.py @@ -53,12 +53,12 @@ class DeckConf(QDialog): current = self.deck['conf'] self.confList = self.mw.col.decks.allConf() self.confList.sort(key=itemgetter('name')) - startOn = None + startOn = 0 self.ignoreConfChange = True self.form.dconf.clear() for idx, conf in enumerate(self.confList): self.form.dconf.addItem(conf['name']) - if conf['id'] == current: + if str(conf['id']) == str(current): startOn = idx self.ignoreConfChange = False self.form.dconf.setCurrentIndex(startOn)