Anki/rslib/src/notetype
Arold0 76d3237139
Fix notetype original_stock_kind using wrong enum (#4382)
Use OriginalStockKind instead of StockKind when setting
original_stock_kind for basic notetype variants. The two enums
have different numeric values, causing 'Restore to Default' to
restore the wrong template.

For example, StockKind::BasicTyping has value 3, but when read
back as OriginalStockKind, value 3 corresponds to
BasicOptionalReversed instead of BasicTyping (which is 4).

This fixes the off-by-one behavior where:
- Basic (type in the answer) → Basic (optional reversed card)
- Basic (and reversed card) → Basic (optional reversed card)
- Basic (optional reversed card) → Basic (and reversed card)

Fixes #4353
2025-10-09 01:50:50 +03:00
..
cardgen.rs Show the number of cards added when adding (#4310) 2025-09-02 18:06:49 +10:00
checks.rs Bump Rust to 1.84 2025-01-26 18:51:21 +11:00
cloze_styling.css Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00
emptycards.rs Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
fields.rs Add support for tagging + protecting fields 2023-09-17 14:03:42 +10:00
header.tex move latex header and styling into separate files 2020-05-12 21:13:33 +10:00
merge.rs Cloze notetype merges (#2912) 2023-12-28 18:01:23 +10:00
mod.rs Fix/Missing cardID special field (#4078) 2025-06-13 10:47:16 +07:00
notetypechange.rs Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
render.rs Fixes for Rust 1.89 2025-09-01 14:55:49 +10:00
restore.rs Add image occlusion to stock notetypes 2023-10-22 11:00:39 +10:00
schema11.rs Update to Rust 1.88 2025-06-29 11:50:49 +07:00
schemachange.rs Fix newer notes incorrectly being skipped when importing successive exports (#3693) 2025-01-13 13:42:44 +11:00
service.rs Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
stock.rs Fix notetype original_stock_kind using wrong enum (#4382) 2025-10-09 01:50:50 +03:00
styling.css Update default styles (#4060) 2025-06-08 11:24:46 +07:00
templates.rs Fix Renaming note fields not updating custom browser appearance (#3245) 2024-06-24 08:39:56 +01:00
undo.rs Refactor error handling (#2136) 2022-10-21 18:02:12 +10:00