mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
Tear down the Design canvas at shutdown
The Design tab's viewport is the fourth GLCanvas3D on the shared GL context and the only one the plater does not own, so unbind_canvas_event_handlers() and reset_canvas_volumes() never reached it — the macOS Command+Q and Debian cases those calls exist for. Its frame-level handlers become members so they can be unbound.
This commit is contained in:
@@ -13557,6 +13557,14 @@ void Plater::priv::unbind_canvas_event_handlers()
|
||||
|
||||
if (assemble_view != nullptr)
|
||||
assemble_view->get_canvas3d()->unbind_event_handlers();
|
||||
|
||||
#ifdef SLIC3R_CAD
|
||||
// The Design tab's viewport is a fourth GLCanvas3D on the same shared GL context, owned by
|
||||
// MainFrame rather than by us — same reach as reset() uses for clear_document(). Null until
|
||||
// the tab has been opened once, so most sessions skip it.
|
||||
if (wxGetApp().mainframe != nullptr && wxGetApp().mainframe->m_design_panel != nullptr)
|
||||
wxGetApp().mainframe->m_design_panel->unbind_canvas_event_handlers();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Plater::priv::reset_canvas_volumes()
|
||||
@@ -13566,6 +13574,11 @@ void Plater::priv::reset_canvas_volumes()
|
||||
|
||||
if (preview != nullptr)
|
||||
preview->get_canvas3d()->reset_volumes();
|
||||
|
||||
#ifdef SLIC3R_CAD
|
||||
if (wxGetApp().mainframe != nullptr && wxGetApp().mainframe->m_design_panel != nullptr)
|
||||
wxGetApp().mainframe->m_design_panel->reset_canvas_volumes();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Plater::priv::check_ams_status_impl(bool is_slice_all)
|
||||
|
||||
Reference in New Issue
Block a user