mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
keep focus when resetting fact editor
This commit is contained in:
parent
a46c9a8b26
commit
ebbf32b750
1 changed files with 2 additions and 0 deletions
|
@ -496,8 +496,10 @@ class FactEditor(object):
|
||||||
self.fact.setModified(textChanged=True)
|
self.fact.setModified(textChanged=True)
|
||||||
if not self.fact.isNew():
|
if not self.fact.isNew():
|
||||||
self.deck.setModified()
|
self.deck.setModified()
|
||||||
|
oldFocus = ankiqt.mw.app.focusWidget()
|
||||||
if self.resetOnEdit:
|
if self.resetOnEdit:
|
||||||
ankiqt.mw.reset()
|
ankiqt.mw.reset()
|
||||||
|
oldFocus.setFocus()
|
||||||
self.deck.setUndoEnd(n)
|
self.deck.setUndoEnd(n)
|
||||||
|
|
||||||
def onFocusLost(self, widget):
|
def onFocusLost(self, widget):
|
||||||
|
|
Loading…
Reference in a new issue