From 76d3237139b3e73b98f5a5b4dfeeeea2f0554644 Mon Sep 17 00:00:00 2001 From: Arold0 <165577303+arold0@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:50:50 +0200 Subject: [PATCH 1/3] Fix notetype original_stock_kind using wrong enum (#4382) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CONTRIBUTORS | 2 +- rslib/src/notetype/stock.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a18833b04..cc651e198 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -249,7 +249,7 @@ Toby Penner Danilo Spillebeen Matbe766 Amanda Sternberg -arold0 +arold0 ******************** diff --git a/rslib/src/notetype/stock.rs b/rslib/src/notetype/stock.rs index 9b5df66d5..b27881809 100644 --- a/rslib/src/notetype/stock.rs +++ b/rslib/src/notetype/stock.rs @@ -122,7 +122,7 @@ pub(crate) fn basic(tr: &I18n) -> Notetype { pub(crate) fn basic_typing(tr: &I18n) -> Notetype { let mut nt = basic(tr); - nt.config.original_stock_kind = StockKind::BasicTyping as i32; + nt.config.original_stock_kind = OriginalStockKind::BasicTyping as i32; nt.name = tr.notetypes_basic_type_answer_name().into(); let front = tr.notetypes_front_field(); let back = tr.notetypes_back_field(); @@ -138,7 +138,7 @@ pub(crate) fn basic_typing(tr: &I18n) -> Notetype { pub(crate) fn basic_forward_reverse(tr: &I18n) -> Notetype { let mut nt = basic(tr); - nt.config.original_stock_kind = StockKind::BasicAndReversed as i32; + nt.config.original_stock_kind = OriginalStockKind::BasicAndReversed as i32; nt.name = tr.notetypes_basic_reversed_name().into(); let front = tr.notetypes_front_field(); let back = tr.notetypes_back_field(); @@ -156,7 +156,7 @@ pub(crate) fn basic_forward_reverse(tr: &I18n) -> Notetype { pub(crate) fn basic_optional_reverse(tr: &I18n) -> Notetype { let mut nt = basic_forward_reverse(tr); - nt.config.original_stock_kind = StockKind::BasicOptionalReversed as i32; + nt.config.original_stock_kind = OriginalStockKind::BasicOptionalReversed as i32; nt.name = tr.notetypes_basic_optional_reversed_name().into(); let addrev = tr.notetypes_add_reverse_field(); nt.add_field(addrev.as_ref()); From ab2fe98c5415af50036b5d2880252997390f094b Mon Sep 17 00:00:00 2001 From: nav1s <42621369+nav1s@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:27:40 +0300 Subject: [PATCH 2/3] feat: add tooltips for sidebar items in the browse cards window (#4385) * feat: add tooltips for all of the sidabar items in the browse cards window * fix: add name to CONTRIBUTORS --- CONTRIBUTORS | 2 +- qt/aqt/browser/sidebar/item.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index cc651e198..4e01aa0b2 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -250,7 +250,7 @@ Danilo Spillebeen Matbe766 Amanda Sternberg arold0 - +nav1s ******************** diff --git a/qt/aqt/browser/sidebar/item.py b/qt/aqt/browser/sidebar/item.py index ce5ccb62f..b51910d4b 100644 --- a/qt/aqt/browser/sidebar/item.py +++ b/qt/aqt/browser/sidebar/item.py @@ -80,7 +80,7 @@ class SidebarItem: self.search_node = search_node self.on_expanded = on_expanded self.children: list[SidebarItem] = [] - self.tooltip: str | None = None + self.tooltip: str = name self._parent_item: SidebarItem | None = None self._expanded = expanded self._row_in_parent: int | None = None From 321e23acb2b02d657ca08727546c016d7ef27381 Mon Sep 17 00:00:00 2001 From: Lee Doughty <32392044+leedoughty@users.noreply.github.com> Date: Mon, 13 Oct 2025 07:37:30 +0100 Subject: [PATCH 3/3] Replace custom UUID function with crypto.randomUUID (#4384) --- ts/editable/Mathjax.svelte | 3 +-- ts/lib/tslib/uuid.ts | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 ts/lib/tslib/uuid.ts diff --git a/ts/editable/Mathjax.svelte b/ts/editable/Mathjax.svelte index 74fbbba43..65cf570ee 100644 --- a/ts/editable/Mathjax.svelte +++ b/ts/editable/Mathjax.svelte @@ -31,7 +31,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html