anki/qt
evandrocoan f78166cda2 Fixed previewer.py::render_card() being called twice in row
Related to: https://github.com/ankitects/anki/pull 529
Ensuring "setNote" is called only once during changing of note type

After debugging the code, every time the cards changes, there are
two stacktraces generated and triggered when note cards change:

calling 1590591251.4621403
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 477, in <lambda>
    self.web.evalWithCallback("saveNow(%d)" % keepFocus, lambda res: callback())
  File "F:\anki\qt\aqt\browser.py", line 858, in <lambda>
    self.editor.saveNow(lambda: self._onRowChanged(current, previous))
  File "F:\anki\qt\aqt\browser.py", line 880, in _onRowChanged
    self._renderPreview(True)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )

calling 1590591251.4766161
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 453, in oncallback
    gui_hooks.editor_did_load_note(self)
  File "F:\anki\qt\aqt\gui_hooks.py", line 1168, in __call__
    hook(editor)
  File "F:\anki\qt\aqt\browser.py", line 887, in onLoadNote
    self.refreshCurrentCard(editor.note)
  File "F:\anki\qt\aqt\browser.py", line 884, in refreshCurrentCard
    self._renderPreview(False)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )
2020-05-27 14:41:07 -03:00
..
aqt Fixed previewer.py::render_card() being called twice in row 2020-05-27 14:41:07 -03:00
aqt_data/web show spinner when media sync active, click to reveal dialog 2020-02-17 08:40:16 +10:00
designer EMPTY_CARDS should not be translatable 2020-05-22 11:45:14 +10:00
ftl fix push-i18n-ftl 2020-04-01 18:20:31 +10:00
po Add missing close file descriptors using context managers 2020-05-18 15:54:20 -03:00
tests FString -> TR 2020-02-27 12:25:19 +10:00
tools Satisfy black reformatter 2020-05-23 11:14:52 +02:00
ts Revert "use isolation characters instead of direction markers in cloze handling" 2020-05-11 19:25:49 +10:00
.gitignore merge i18n into qt/ 2020-01-03 07:59:00 +10:00
.isort.cfg make sure isort preserves ordering if anki installed into python env 2020-01-03 13:34:51 +10:00
.pylintrc tweaking the folder names again 2020-01-03 07:48:38 +10:00
anki.1 tweaking the folder names again 2020-01-03 07:48:38 +10:00
anki.desktop Add .ankiaddon mime-type on Linux and register Anki as its handler 2020-01-03 17:58:11 +01:00
anki.png tweaking the folder names again 2020-01-03 07:48:38 +10:00
anki.xml Add .ankiaddon mime-type on Linux and register Anki as its handler 2020-01-03 17:58:11 +01:00
anki.xpm tweaking the folder names again 2020-01-03 07:48:38 +10:00
Makefile avoid installing pyaudio on every run 2020-05-12 21:10:21 +10:00
mypy.ini switch to new deck tree in deck browser 2020-05-16 10:52:14 +10:00
pkgkey.asc tweaking the folder names again 2020-01-03 07:48:38 +10:00
pyproject.toml Set to build a source distribution instead of build distribution 2020-04-02 22:56:37 -03:00
requirements.dev tweaking the folder names again 2020-01-03 07:48:38 +10:00
requirements.qt tweaking the folder names again 2020-01-03 07:48:38 +10:00
runanki tweaking the folder names again 2020-01-03 07:48:38 +10:00
setup.py bump version 2020-05-18 12:50:20 +10:00