From d2ae874d9e1615d09afc912275cc3b27776a1392 Mon Sep 17 00:00:00 2001 From: cecini Date: Tue, 15 Dec 2020 13:09:19 +0000 Subject: [PATCH] fix float to int conversion DeprecationWarning --- qt/aqt/preferences.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/preferences.py b/qt/aqt/preferences.py index 33ebd4fbd..63589ef31 100644 --- a/qt/aqt/preferences.py +++ b/qt/aqt/preferences.py @@ -90,8 +90,8 @@ class Preferences(QDialog): f.useCurrent.setCurrentIndex(int(not qc.get("addToCur", True))) s = self.prefs - f.lrnCutoff.setValue(s.learn_ahead_secs / 60.0) - f.timeLimit.setValue(s.time_limit_secs / 60.0) + f.lrnCutoff.setValue(int(s.learn_ahead_secs / 60.0)) + f.timeLimit.setValue(int(s.time_limit_secs / 60.0)) f.showEstimates.setChecked(s.show_intervals_on_buttons) f.showProgress.setChecked(s.show_remaining_due_counts) f.newSpread.setCurrentIndex(s.new_review_mix) @@ -215,7 +215,7 @@ class Preferences(QDialog): def setupOptions(self): self.form.pastePNG.setChecked(self.prof.get("pastePNG", False)) - self.form.uiScale.setValue(self.mw.pm.uiScale() * 100) + self.form.uiScale.setValue(int(self.mw.pm.uiScale() * 100)) self.form.pasteInvert.setChecked(self.prof.get("pasteInvert", False)) self.form.showPlayButtons.setChecked(self.prof.get("showPlayButtons", True)) self.form.nightMode.setChecked(self.mw.pm.night_mode())