mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -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):
|
def readData(self):
|
||||||
# properties section
|
# properties section
|
||||||
self.dialog.name.setText(self.m.name)
|
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))
|
self.dialog.mediaURL.setText(unicode(self.m.features))
|
||||||
|
|
||||||
# Cards
|
# Cards
|
||||||
|
@ -84,7 +82,7 @@ class ModelProperties(QDialog):
|
||||||
status=""
|
status=""
|
||||||
else:
|
else:
|
||||||
status=_("; disabled")
|
status=_("; disabled")
|
||||||
label = _("%(name)s: used %(cards)d times%(status)s") % {
|
label = _("%(name)s [%(cards)d cards%(status)s]") % {
|
||||||
'num': n,
|
'num': n,
|
||||||
'name': card.name,
|
'name': card.name,
|
||||||
'status': status,
|
'status': status,
|
||||||
|
@ -267,13 +265,6 @@ class ModelProperties(QDialog):
|
||||||
if not url.endswith("/"):
|
if not url.endswith("/"):
|
||||||
url += "/"
|
url += "/"
|
||||||
self.updateField(self.m, 'features', 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
|
# before field, or it's overwritten
|
||||||
self.saveCurrentCard()
|
self.saveCurrentCard()
|
||||||
# if changed, reset deck
|
# if changed, reset deck
|
||||||
|
|
|
@ -41,51 +41,17 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="name"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<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">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Media URL</string>
|
<string>Media URL</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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"/>
|
<widget class="QLineEdit" name="mediaURL"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
Loading…
Reference in a new issue