fix deck conf bugs

This commit is contained in:
Damien Elmes 2011-12-11 00:24:08 +09:00
parent 569b903cdc
commit ed85bec6cc
2 changed files with 5 additions and 7 deletions

View file

@ -16,7 +16,9 @@ class DeckConf(QDialog):
self.form = aqt.forms.dconf.Ui_Dialog()
self.form.setupUi(self)
self.mw.checkpoint(_("Options"))
self.setupCombos()
self.setupConfs()
self.setWindowModality(Qt.WindowModal)
self.connect(self.form.buttonBox,
SIGNAL("helpRequested()"),
lambda: openHelp("StudyOptions"))
@ -25,7 +27,6 @@ class DeckConf(QDialog):
self.connect(self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults),
SIGNAL("clicked()"),
self.onRestore)
self.setupCombos()
self.setWindowTitle(_("Options for %s") % self.deck['name'])
self.exec_()
@ -148,12 +149,10 @@ class DeckConf(QDialog):
f.autoplaySounds.setChecked(c['autoplay'])
def onRestore(self):
self.mw.progress.start()
self.mw.col.decks.restoreToDefault(self.conf)
self.mw.progress.finish()
self.loadConf()
f = self.form
f.dayOffset.setValue(4)
f.lrnCutoff.setValue(20)
f.timeLimit.setValue(0)
# New order
##################################################

View file

@ -125,7 +125,7 @@ button { font-weight: bold; }
def _renderBottom(self):
links = [
["opts", _("Study Options")],
["opts", _("Options")],
["cram", _("Cram")],
]
buf = ""
@ -134,4 +134,3 @@ button { font-weight: bold; }
self.bottom.draw(buf)
self.bottom.web.setFixedHeight(32)
self.bottom.web.setLinkHandler(self._linkHandler)