Commit Graph

20 Commits

Author SHA1 Message Date
Henrik Giesel
a1b5acd46a Fix type signature: models is passed because it's a method 2020-08-31 13:35:18 +02:00
Henrik Giesel
90f0df2a52 Remove duplicated buttons 2020-08-31 13:35:18 +02:00
Henrik Giesel
ea787c73a5 Fix uninitialized buttons object 2020-08-31 13:35:18 +02:00
Henrik Giesel
ad27e0149a Add usage in models.py 2020-08-31 13:35:18 +02:00
Henrik Giesel
0c3fad7386 Add unused add_button method 2020-08-31 13:33:59 +02:00
Arthur Milchior
c4db4bd291 Any removed 2020-08-12 01:37:21 +02:00
Fabian Wood
e49a00fdeb added type hints to qt models 2020-07-30 13:28:52 +10:00
Matt Krump
b0dd85f87e Add type hints to aqt.models
* Add type hints to aqt.models
* Turn on type checking for aqt.models
2020-07-24 10:59:45 -06:00
Damien Elmes
8f207cc900 drop mw.weakref usage in models.py for now
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
2020-05-20 13:53:34 +10:00
Damien Elmes
2ac33500eb fetch stock notetypes from backend 2020-05-15 17:08:24 +10:00
Damien Elmes
782911471b add "fill empty" checkbox 2020-05-14 20:58:45 +10:00
Damien Elmes
6680cdf1d3 update the card layout screen
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
2020-05-13 17:24:49 +10:00
Damien Elmes
25f122bf5c update fields and models diags
- field changes are now applied when user closes dialog with save
button, in bulk
- models diag now fetches note type and saves it as required, instead
of holding on top a copy that can grow stale as changes are made in
subdialogs
- both dialogs now perform operations in the backend
- note.model() now fetches the note type on the fly, instead of
holding on to a copy that may become stale
2020-05-12 21:13:34 +10:00
Damien Elmes
36c1d1cf8c reuse existing use count in note types screen 2020-05-12 21:13:33 +10:00
Damien Elmes
ce104d16a3 mypy/isort fixes 2020-05-12 21:13:33 +10:00
Damien Elmes
f637ac957d hook up new note and note type handling
- notetypes are fetched from the DB as needed, and cached in Python
- handle note type changes in the backend. Multiple operations can now
be performed in one go, but this is not currently exposed in the GUI.
- extra methods to grab sorted note type names quickly, and fetch by
name
- col.models.save() without a provided notetype is now a no-op
- note loading/saving handled in the backend
- notes with no valid cards can now be added
- templates can now be deleted even if they would previously
orphan notes

a number of fixmes have been left in notes.py and models.py
2020-05-12 21:13:33 +10:00
Damien Elmes
eec3fcf87a use qconnect everywhere, and fix some typing issues
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
BlueGreenMagick
12b69af9b2 detect renamed cloze fields in note type preview
and cloze fields that is also other special field type
such as '{{cloze:hint:Text}}'
2020-04-07 08:56:54 +09:00
Arthur Milchior
b73507344c Hook models_advanced_will_show
This will be useful for add-on 1863928230. I want to let users change
the LaTeX footer/header everywhere.
2020-03-19 12:03:09 +01:00
Damien Elmes
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00