From 62426279ffca8a454ec4e3f5c22e6729932403f7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 11 Feb 2022 10:59:04 +1000 Subject: [PATCH] fix error when opening old deck options in python 3.10 Closes #1616 --- qt/aqt/deckconf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/deckconf.py b/qt/aqt/deckconf.py index 690af763a..4ac709ea8 100644 --- a/qt/aqt/deckconf.py +++ b/qt/aqt/deckconf.py @@ -204,7 +204,7 @@ class DeckConf(QDialog): f.lrnSteps.setText(self.listToUser(c["delays"])) f.lrnGradInt.setValue(c["ints"][0]) f.lrnEasyInt.setValue(c["ints"][1]) - f.lrnFactor.setValue(c["initialFactor"] / 10.0) + f.lrnFactor.setValue(int(c["initialFactor"] / 10.0)) f.newOrder.setCurrentIndex(c["order"]) f.newPerDay.setValue(c["perDay"]) f.bury.setChecked(c.get("bury", True)) @@ -212,7 +212,7 @@ class DeckConf(QDialog): # rev c = self.conf["rev"] f.revPerDay.setValue(c["perDay"]) - f.easyBonus.setValue(c["ease4"] * 100) + f.easyBonus.setValue(int(c["ease4"] * 100)) f.fi1.setValue(c["ivlFct"] * 100) f.maxIvl.setValue(c["maxIvl"]) f.revplim.setText(self.parentLimText("rev")) @@ -224,7 +224,7 @@ class DeckConf(QDialog): # lapse c = self.conf["lapse"] f.lapSteps.setText(self.listToUser(c["delays"])) - f.lapMult.setValue(c["mult"] * 100) + f.lapMult.setValue(int(c["mult"] * 100)) f.lapMinInt.setValue(c["minInt"]) f.leechThreshold.setValue(c["leechFails"]) f.leechAction.setCurrentIndex(c["leechAction"])