From b1d3e997df4e45f85704f39a530f44fa145d5079 Mon Sep 17 00:00:00 2001 From: viewit Date: Thu, 11 Jun 2026 10:58:27 +0200 Subject: [PATCH] fix(stable): wx 3.3.2 wxComboPopup-Cast in combochecklist (dynamic_cast) --- src/slic3r/GUI/GUI.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index d133720c7e2..5b9593abdae 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -461,7 +461,9 @@ unsigned int combochecklist_get_flags(wxComboCtrl* comboCtrl) { unsigned int flags = 0; - wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup); + // wx 3.3.2: wxComboPopup no longer derives from wxObject, so wxDynamicCast + // (which static_casts to wxObject*) is invalid here — use C++ dynamic_cast. + wxCheckListBoxComboPopup* popup = dynamic_cast(comboCtrl->GetPopupControl()); if (popup != nullptr) { for (unsigned int i = 0; i < popup->GetCount(); ++i) { if (popup->IsChecked(i)) @@ -474,7 +476,9 @@ unsigned int combochecklist_get_flags(wxComboCtrl* comboCtrl) void combochecklist_set_flags(wxComboCtrl* comboCtrl, unsigned int flags) { - wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup); + // wx 3.3.2: wxComboPopup no longer derives from wxObject, so wxDynamicCast + // (which static_casts to wxObject*) is invalid here — use C++ dynamic_cast. + wxCheckListBoxComboPopup* popup = dynamic_cast(comboCtrl->GetPopupControl()); if (popup != nullptr) { for (unsigned int i = 0; i < popup->GetCount(); ++i) { popup->Check(i, (flags & (1 << i)) != 0);