Let the pre-slice warnings checkbox redraw when clicked

Its toggle handler did not call Skip(), so CheckBox's own handler, which
redraws the tick, never ran. Each click still flipped and saved the
setting, but the box kept showing it ticked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Clifford Garwood
2026-10-09 01:29:18 -04:00
co-authored by Claude Opus 5.5
parent 7c2566488a
commit dafc8c5f92
+2 -1
View File
@@ -5856,8 +5856,9 @@ if (is_marlin_flavor)
auto* cb = new ::CheckBox(parent);
const bool enabled = wxGetApp().app_config->get("imex_pre_slice_warnings") != "false";
cb->SetValue(enabled);
cb->Bind(wxEVT_TOGGLEBUTTON, [cb](wxCommandEvent&) {
cb->Bind(wxEVT_TOGGLEBUTTON, [cb](wxCommandEvent& e) {
wxGetApp().app_config->set("imex_pre_slice_warnings", cb->GetValue() ? "true" : "false");
e.Skip(); // CheckBox's own handler redraws the tick
});
auto* s = new wxBoxSizer(wxHORIZONTAL);
s->Add(cb, 0, wxALIGN_CENTER_VERTICAL);