mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 22:42:37 +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:
@@ -6991,6 +6991,17 @@ void DesignPanel::on_tab_shown()
|
||||
if (m_viewport) m_viewport->force_repaint(); // the page was just re-shown: paint it for real
|
||||
}
|
||||
|
||||
// Application close / language switch, from the plater's canvas teardown.
|
||||
void DesignPanel::unbind_canvas_event_handlers()
|
||||
{
|
||||
if (m_viewport) m_viewport->unbind_canvas_event_handlers();
|
||||
}
|
||||
|
||||
void DesignPanel::reset_canvas_volumes()
|
||||
{
|
||||
if (m_viewport) m_viewport->reset_canvas_volumes();
|
||||
}
|
||||
|
||||
// Match Prepare's sidebar width instead of hardcoding one. Design used a fixed 264 px against
|
||||
// Prepare's ~467, so the canvas edge jumped sideways on every tab switch; reading the live width
|
||||
// also means the two stay aligned if Orca ever changes its sidebar.
|
||||
|
||||
Reference in New Issue
Block a user