From 7ea69199fdfcc68c35f24bf9547e7ad997921ba2 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 25 Mar 2026 11:29:40 +0800 Subject: [PATCH] Fix wxDynamicCast on wxComboPopup for wxWidgets 3.3 wxComboPopup no longer inherits from wxObject in wx 3.3, so wxDynamicCast (which casts through wxObject) fails. Use dynamic_cast directly instead. --- src/slic3r/GUI/GUI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index 6fbdbee6e9..328993beff 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -461,7 +461,7 @@ unsigned int combochecklist_get_flags(wxComboCtrl* comboCtrl) { unsigned int flags = 0; - wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup); + wxCheckListBoxComboPopup* popup = dynamic_cast(comboCtrl->GetPopupControl()); if (popup != nullptr) { for (unsigned int i = 0; i < popup->GetCount(); ++i) { if (popup->IsChecked(i)) @@ -474,7 +474,7 @@ unsigned int combochecklist_get_flags(wxComboCtrl* comboCtrl) void combochecklist_set_flags(wxComboCtrl* comboCtrl, unsigned int flags) { - wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup); + 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);