mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add custom steps back to v1 sched options
This commit is contained in:
parent
560c21c59d
commit
fc23241f0a
2 changed files with 53 additions and 3 deletions
|
@ -59,6 +59,15 @@ class DeckConf(QDialog):
|
|||
|
||||
search, limit, order = d['terms'][0]
|
||||
f.search.setText(search)
|
||||
|
||||
if self.mw.col.schedVer() == 1:
|
||||
if d['delays']:
|
||||
f.steps.setText(self.listToUser(d['delays']))
|
||||
f.stepsOn.setChecked(True)
|
||||
else:
|
||||
f.steps.setVisible(False)
|
||||
f.stepsOn.setVisible(False)
|
||||
|
||||
f.order.setCurrentIndex(order)
|
||||
f.limit.setValue(limit)
|
||||
f.previewDelay.setValue(d.get("previewDelay", 10))
|
||||
|
@ -82,6 +91,13 @@ class DeckConf(QDialog):
|
|||
d['resched'] = f.resched.isChecked()
|
||||
d['delays'] = None
|
||||
|
||||
if self.mw.col.schedVer() == 1 and f.stepsOn.isChecked():
|
||||
steps = self.userToList(f.steps)
|
||||
if steps:
|
||||
d['delays'] = steps
|
||||
else:
|
||||
d['delays'] = None
|
||||
|
||||
terms = [[
|
||||
f.search.text(),
|
||||
f.limit.value(),
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>382</width>
|
||||
<height>413</height>
|
||||
<width>392</width>
|
||||
<height>472</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -164,6 +164,23 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLineEdit" name="steps">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1 10</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="stepsOn">
|
||||
<property name="text">
|
||||
<string>Custom steps (in minutes)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -202,7 +219,8 @@
|
|||
<tabstop>resched</tabstop>
|
||||
<tabstop>previewDelay</tabstop>
|
||||
<tabstop>secondFilter</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
<tabstop>stepsOn</tabstop>
|
||||
<tabstop>steps</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
@ -254,5 +272,21 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>stepsOn</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>steps</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>194</x>
|
||||
<y>351</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>190</x>
|
||||
<y>378</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in a new issue