mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
remove obsolete spacing options from model properties
This commit is contained in:
parent
55e1a2191c
commit
ef27280b08
2 changed files with 5 additions and 48 deletions
|
@ -38,8 +38,6 @@ class ModelProperties(QDialog):
|
|||
def readData(self):
|
||||
# properties section
|
||||
self.dialog.name.setText(self.m.name)
|
||||
self.dialog.spacing.setText(str(self.m.spacing))
|
||||
self.dialog.initialSpacing.setText(str(self.m.initialSpacing/60))
|
||||
self.dialog.mediaURL.setText(unicode(self.m.features))
|
||||
|
||||
# Cards
|
||||
|
@ -84,7 +82,7 @@ class ModelProperties(QDialog):
|
|||
status=""
|
||||
else:
|
||||
status=_("; disabled")
|
||||
label = _("%(name)s: used %(cards)d times%(status)s") % {
|
||||
label = _("%(name)s [%(cards)d cards%(status)s]") % {
|
||||
'num': n,
|
||||
'name': card.name,
|
||||
'status': status,
|
||||
|
@ -267,13 +265,6 @@ class ModelProperties(QDialog):
|
|||
if not url.endswith("/"):
|
||||
url += "/"
|
||||
self.updateField(self.m, 'features', url)
|
||||
try:
|
||||
self.updateField(self.m, 'spacing',
|
||||
float(self.dialog.spacing.text()))
|
||||
self.updateField(self.m, 'initialSpacing',
|
||||
float(self.dialog.initialSpacing.text())*60)
|
||||
except ValueError:
|
||||
pass
|
||||
# before field, or it's overwritten
|
||||
self.saveCurrentCard()
|
||||
# if changed, reset deck
|
||||
|
|
|
@ -41,51 +41,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="name"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Minimum spacing</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>Spacing multiplier</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="initialSpacing"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="spacing"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Media URL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="name"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="mediaURL"/>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in a new issue