mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 17:21:10 +00:00
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:
co-authored by
Claude Opus 5.5
parent
7c2566488a
commit
dafc8c5f92
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user