mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
Use Plater's existing background_process() accessor
It was already public and used elsewhere, so the new get_background_process() and its duplicate forward declaration were redundant; Plater.hpp is now untouched.
This commit is contained in:
@@ -39,10 +39,9 @@ DesignCanvas::DesignCanvas(wxWindow* parent)
|
||||
m_canvas->allow_multisample(OpenGLManager::can_multisample());
|
||||
m_canvas->set_config(wxGetApp().plater()->config());
|
||||
m_canvas->set_model(&m_model);
|
||||
// Reuse the editor's shared slicing process: GLCanvas3D::render() (via
|
||||
// _max_bounding_box) dereferences the process when canvas type == View3D.
|
||||
// Passing nullptr segfaults; this mirrors View3D/Preview/AssembleView.
|
||||
m_canvas->set_process(wxGetApp().plater()->get_background_process());
|
||||
// Nothing to slice here, but GLCanvas3D derefs the process unguarded every frame, so it
|
||||
// cannot be null. Borrow the plater's, as the editor canvases do.
|
||||
m_canvas->set_process(&wxGetApp().plater()->background_process());
|
||||
m_canvas->set_type(GLCanvas3D::ECanvasType::CanvasView3D);
|
||||
|
||||
// CAD navigation, this canvas only: left-drag sweeps a selection rubber band, so orbit
|
||||
|
||||
Reference in New Issue
Block a user