mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
update deckproperties diag for new delay1 handling
This commit is contained in:
parent
4828c543ca
commit
c2d9ab9423
1 changed files with 3 additions and 6 deletions
|
@ -56,7 +56,7 @@ class DeckProperties(QDialog):
|
|||
v = getattr(self.d, type + "IntervalMax")
|
||||
getattr(self.dialog, type + "Max").setText(str(v))
|
||||
self.dialog.delay0.setText(unicode(self.d.delay0/60.0))
|
||||
self.dialog.delay1.setText(unicode(self.d.delay1/60.0))
|
||||
self.dialog.delay1.setText(unicode(self.d.delay1))
|
||||
self.dialog.delay2.setText(unicode(self.d.delay2))
|
||||
self.dialog.collapse.setCheckState(self.d.collapseTime
|
||||
and Qt.Checked or Qt.Unchecked)
|
||||
|
@ -183,11 +183,8 @@ class DeckProperties(QDialog):
|
|||
try:
|
||||
v = float(self.dialog.delay0.text()) * 60.0
|
||||
self.updateField(self.d, 'delay0', v)
|
||||
v2 = float(self.dialog.delay1.text()) * 60.0
|
||||
if v2 < v:
|
||||
ui.utils.showInfo(_("Again (Young) must be <= Again (Mature)."),
|
||||
parent=self.parent)
|
||||
v2 = v
|
||||
v2 = int(self.dialog.delay1.text())
|
||||
v2 = max(0, v2)
|
||||
self.updateField(self.d, 'delay1', v2)
|
||||
v = float(self.dialog.delay2.text())
|
||||
self.updateField(self.d, 'delay2', min(v, 1))
|
||||
|
|
Loading…
Reference in a new issue