From a78bed0fd79afbb89d0fb2bb066b73ddf75fee3e Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Thu, 15 Dec 2022 17:07:22 -0700 Subject: [PATCH] GUI_ObjectTable: Fix casting of wxGridCellEditorEvtHandler Fixes linking errors like: /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: slic3r/liblibslic3r_gui.a(GUI_ObjectTable.cpp.o): in function `wxClassInfo::IsKindOf(wxClassInfo const*) const': /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:88: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo' /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:93: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo' /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:99: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo' /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:93: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo' /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:88: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo' --- src/slic3r/GUI/GUI_ObjectTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectTable.cpp b/src/slic3r/GUI/GUI_ObjectTable.cpp index 7212a5534..79628e222 100644 --- a/src/slic3r/GUI/GUI_ObjectTable.cpp +++ b/src/slic3r/GUI/GUI_ObjectTable.cpp @@ -201,7 +201,7 @@ void GridCellFilamentsEditor::BeginEdit(int row, int col, wxGrid* grid) { // This event handler is needed to properly dismiss the editor when the popup is closed m_control->Bind(wxEVT_COMBOBOX_CLOSEUP, &GridCellFilamentsEditor::OnComboCloseUp, this); - evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + evtHandler = static_cast(m_control->GetEventHandler()); } // Don't immediately end if we get a kill focus event within BeginEdit @@ -403,7 +403,7 @@ void GridCellChoiceEditor::BeginEdit(int row, int col, wxGrid *grid) if (m_control) { // This event handler is needed to properly dismiss the editor when the popup is closed m_control->Bind(wxEVT_COMBOBOX_CLOSEUP, &GridCellChoiceEditor::OnComboCloseUp, this); - evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + evtHandler = static_cast(m_control->GetEventHandler()); } // Don't immediately end if we get a kill focus event within BeginEdit