mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
Fix Detach from parent checkbox not updating visually (#15520)
Refresh detach-from-parent checkbox state Allow the detach checkbox toggle event to propagate to the custom CheckBox control so it refreshes its bitmap after the value changes.
This commit is contained in:
@@ -149,7 +149,10 @@ SavePresetDialog::Item::Item(Preset::Type type, const std::string &suffix, wxBox
|
|||||||
// Set initial state (unchecked by default)
|
// Set initial state (unchecked by default)
|
||||||
detach_checkbox->SetValue(m_detach);
|
detach_checkbox->SetValue(m_detach);
|
||||||
// Bind the checkbox event to update the detach state for this item
|
// Bind the checkbox event to update the detach state for this item
|
||||||
detach_checkbox->Bind(wxEVT_TOGGLEBUTTON, [this, detach_checkbox](wxCommandEvent&) { m_detach = detach_checkbox->GetValue(); });
|
detach_checkbox->Bind(wxEVT_TOGGLEBUTTON, [this, detach_checkbox](wxCommandEvent& event) {
|
||||||
|
m_detach = detach_checkbox->GetValue();
|
||||||
|
event.Skip(); // Let CheckBox update its bitmap for the new state.
|
||||||
|
});
|
||||||
|
|
||||||
detach_label->SetForegroundColour(wxColour("#363636"));
|
detach_label->SetForegroundColour(wxColour("#363636"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user