anki/qt/tools
Damien Elmes 112cbe8b59 experiment with finer-scoped reset in perform_op()
Basic proof of concept, where the 'delete note' operation in the
reviewer has been updated to use mw.perform_op(). Instead of manually
calling .reset() afterwards, a summary of the changes is returned as
part of the undo status query, and various parts of the GUI can listen
to gui_hooks.operation_did_execute and decide whether they want to
redraw based on the scope of the changes. This should allow the sidebar
to selectively redraw just the tags area in the future for example.

Currently we're just listing out all possible areas that might be changed;
in the future we could theoretically inspect the specific changes in the
undo log to provide a more accurate report (avoiding refreshing the tags
list when no tags were added for example).

You can test it out by opening the browse screen while studying, and
then deleting the current card - the browser should update to show (deleted)
on the cards due the earlier change.

If going ahead with this, aside from updating all the screens that currently
listen for resets, some thought will be required on how we can integrate
it with legacy code that expects to called when resets are made, and expects
to call .reset() when it makes changes.

Thoughts?
2021-03-19 19:45:21 +10:00
..
build_ui.sh fix remaining _() references; remove unused imports 2020-11-18 12:43:46 +10:00
extract_sass_colors.py move remaining Filter button items into sidebar 2021-02-05 18:58:22 +10:00
genhooks_gui.py experiment with finer-scoped reset in perform_op() 2021-03-19 19:45:21 +10:00
profile.py formatting fix 2020-12-18 10:27:32 +10:00
runanki.system.in initial Bazel conversion 2020-11-01 14:26:58 +10:00