Anki/qt
Damien Elmes ce243c2cae Simplify note adding and the deck/notetype choosers
The existing code was really difficult to reason about:

- The default notetype depended on the selected deck, and vice versa,
and this logic was buried in the deck and notetype choosing screens,
and models.py.
- Changes to the notetype were not passed back directly, but were fired
via a hook, which changed any screen in the app that had a notetype
selector.

It also wasn't great for performance, as the most recent deck and tags
were embedded in the notetype, which can be expensive to save and sync
for large notetypes.

To address these points:

- The current deck for a notetype, and notetype for a deck, are now
stored in separate config variables, instead of directly in the deck
or notetype. These are cheap to read and write, and we'll be able to
sync them individually in the future once config syncing is updated in
the future. I seem to recall some users not wanting the tag saving
behaviour, so I've dropped that for now, but if people end up missing
it, it would be simple to add as an extra auxiliary config variable.
- The logic for getting the starting deck and notetype has been moved
into the backend. It should be the same as the older Python code, with
one exception: when "change deck depending on notetype" is enabled in
the preferences, it will start with the current notetype ("curModel"),
instead of first trying to get a deck-specific notetype.
- ModelChooser has been duplicated into notetypechooser.py, and it
has been updated to solely be concerned with keeping track of a selected
notetype - it no longer alters global state.
2021-03-10 11:53:27 +10:00
..
aqt Simplify note adding and the deck/notetype choosers 2021-03-10 11:53:27 +10:00
icons move remaining Filter button items into sidebar 2021-02-05 18:58:22 +10:00
linux remove old symlink before installing a new version 2020-12-30 20:56:28 +10:00
mac exclude Mac dylib from '...' 2021-02-04 20:41:08 +10:00
tests start work on more clearly defining backend/protobuf boundaries 2021-01-31 18:55:45 +10:00
tools move remaining Filter button items into sidebar 2021-02-05 18:58:22 +10:00
.isort.cfg initial Bazel conversion 2020-11-01 14:26:58 +10:00
.pylintrc tweak search wording and tidy up API 2021-02-11 19:57:19 +10:00
bazelfixes.py fix deprecation error on startup on Windows 2020-12-16 15:56:10 +10:00
BUILD.bazel document ANKI_PROFILE_CODE and add bazel command to run snakeviz 2020-12-17 12:03:24 +10:00
dmypy-watch.sh add a bunch of return types 2021-02-01 23:53:23 +10:00
mypy.ini add remaining types and disable missing types on (almost) all aqt 2021-02-03 00:00:29 +10:00
README.md minor doc updates 2020-12-11 22:37:12 +10:00
runanki.py fix pywintypes issue when running tests on Windows 2020-11-02 21:36:01 +10:00

Python's Qt GUI is in aqt/