diff --git a/src/slic3r/GUI/Monitor.cpp b/src/slic3r/GUI/Monitor.cpp index fade6c1429..2e9fc9ed3e 100644 --- a/src/slic3r/GUI/Monitor.cpp +++ b/src/slic3r/GUI/Monitor.cpp @@ -112,7 +112,7 @@ AddMachinePanel::~AddMachinePanel() { init_timer(); - m_side_tools->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MonitorPanel::on_printer_clicked), NULL, this); + m_side_tools->get_panel()->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MonitorPanel::on_printer_clicked), NULL, this); Bind(wxEVT_TIMER, &MonitorPanel::on_timer, this); Bind(wxEVT_SIZE, &MonitorPanel::on_size, this); @@ -125,7 +125,7 @@ AddMachinePanel::~AddMachinePanel() { MonitorPanel::~MonitorPanel() { - m_side_tools->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MonitorPanel::on_printer_clicked), NULL, this); + m_side_tools->get_panel()->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MonitorPanel::on_printer_clicked), NULL, this); if (m_refresh_timer) m_refresh_timer->Stop();