mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
fix options leaking into other fields
This commit is contained in:
parent
2a36c4aaaf
commit
56c5bafe97
1 changed files with 7 additions and 3 deletions
|
@ -337,19 +337,23 @@ order by n""", id=card.id)
|
||||||
|
|
||||||
def readField(self):
|
def readField(self):
|
||||||
field = self.field
|
field = self.field
|
||||||
|
self.updatingFields = True
|
||||||
self.form.fieldName.setText(field.name)
|
self.form.fieldName.setText(field.name)
|
||||||
self.form.fieldUnique.setChecked(field.unique)
|
self.form.fieldUnique.setChecked(field.unique)
|
||||||
self.form.fieldRequired.setChecked(field.required)
|
self.form.fieldRequired.setChecked(field.required)
|
||||||
self.form.numeric.setChecked(field.numeric)
|
self.form.numeric.setChecked(field.numeric)
|
||||||
if field.quizFontFamily:
|
if not field.quizFontFamily:
|
||||||
self.form.fontFamily.setCurrentFont(QFont(
|
# backwards compat
|
||||||
field.quizFontFamily))
|
field.quizFontFamily = u"Arial"
|
||||||
|
self.form.fontFamily.setCurrentFont(QFont(
|
||||||
|
field.quizFontFamily))
|
||||||
self.form.fontSize.setValue(field.quizFontSize or 20)
|
self.form.fontSize.setValue(field.quizFontSize or 20)
|
||||||
self.form.fontSizeEdit.setValue(field.editFontSize or 20)
|
self.form.fontSizeEdit.setValue(field.editFontSize or 20)
|
||||||
self.form.fontColour.setPalette(QPalette(QColor(
|
self.form.fontColour.setPalette(QPalette(QColor(
|
||||||
field.quizFontColour or "#000000")))
|
field.quizFontColour or "#000000")))
|
||||||
self.form.rtl.setChecked(not not field.features)
|
self.form.rtl.setChecked(not not field.features)
|
||||||
self.form.preserveWhitespace.setChecked(not not field.editFontFamily)
|
self.form.preserveWhitespace.setChecked(not not field.editFontFamily)
|
||||||
|
self.updatingFields = False
|
||||||
|
|
||||||
def saveField(self, *args):
|
def saveField(self, *args):
|
||||||
self.needFieldRebuild = True
|
self.needFieldRebuild = True
|
||||||
|
|
Loading…
Reference in a new issue