mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
re-search on reset
This commit is contained in:
parent
6d9f0a5c72
commit
aadf9e2f87
2 changed files with 6 additions and 1 deletions
|
@ -434,6 +434,10 @@ class Browser(QMainWindow):
|
|||
} + " - " + self.deck.name())
|
||||
return selected
|
||||
|
||||
def onReset(self):
|
||||
self.editor.setFact(None)
|
||||
self.onSearch()
|
||||
|
||||
# Table view & editor
|
||||
######################################################################
|
||||
|
||||
|
@ -867,8 +871,10 @@ where id in %s""" % ids2str(sf))
|
|||
|
||||
def setupHooks(self):
|
||||
addHook("checkpoint", self.onCheckpoint)
|
||||
addHook("reset", self.onReset)
|
||||
|
||||
def teardownHooks(self):
|
||||
removeHook("reset", self.onReset)
|
||||
removeHook("checkpoint", self.onCheckpoint)
|
||||
|
||||
def onCheckpoint(self):
|
||||
|
|
|
@ -17,7 +17,6 @@ class Models(QDialog):
|
|||
self.form.setupUi(self)
|
||||
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
|
||||
lambda: aqt.openHelp("Models"))
|
||||
maybeHideClose(self.form.buttonBox)
|
||||
self.setupModels()
|
||||
self.exec_()
|
||||
|
||||
|
|
Loading…
Reference in a new issue