Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Fix endless redraw of settings window if setting has empty row, caused by storing setting in row of previous setting (#8399)

Jasper van Loenen562d066c0ef1
diff --git a/crates/ui-egui/src/prefs_search.rs b/crates/ui-egui/src/prefs_search.rs
index 77bc492430..63e53ec1fc 100644
--- a/crates/ui-egui/src/prefs_search.rs
+++ b/crates/ui-egui/src/prefs_search.rs
@@ -258,6 +258,7 @@ pub(crate) fn begin_page(ui: &Ui, index: usize, label: &str) {
state.page = label.to_string();
state.page_shown = false;
state.section.clear();
+ state.key.clear();
state.section_matches = false;
state.section_shown.clear();
state.heading_open = false;
@@ -270,6 +271,8 @@ pub(crate) fn begin_section(ui: &Ui, title: &str) {
state.section = title.to_string();
state.section_matches = matches || state.force > 0;
state.section_shown.clear();
+ // A dropdown with no row of its own must not store its value under the last row's key.
+ state.key.clear();
state.heading_open = false;
});
}