mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
FIX: fix the crash issue when right-click on object list in preview
Change-Id: I31fc987b762fe2718b4ca1659d14864e44a86225
This commit is contained in:
parent
859aef4c4e
commit
0dc7f51782
3 changed files with 7 additions and 7 deletions
|
@ -305,7 +305,7 @@ static ObjectDataViewModel* list_model()
|
||||||
|
|
||||||
static const Selection& get_selection()
|
static const Selection& get_selection()
|
||||||
{
|
{
|
||||||
return plater()->canvas3D()->get_selection();
|
return plater()->get_current_canvas3D(true)->get_selection();
|
||||||
}
|
}
|
||||||
|
|
||||||
// category -> vector ( option ; label )
|
// category -> vector ( option ; label )
|
||||||
|
|
|
@ -1838,7 +1838,7 @@ struct Plater::priv
|
||||||
bool is_view3D_layers_editing_enabled() const { return (current_panel == view3D) && view3D->get_canvas3d()->is_layers_editing_enabled(); }
|
bool is_view3D_layers_editing_enabled() const { return (current_panel == view3D) && view3D->get_canvas3d()->is_layers_editing_enabled(); }
|
||||||
|
|
||||||
void set_current_canvas_as_dirty();
|
void set_current_canvas_as_dirty();
|
||||||
GLCanvas3D* get_current_canvas3D();
|
GLCanvas3D* get_current_canvas3D(bool exclude_preview = false);
|
||||||
void unbind_canvas_event_handlers();
|
void unbind_canvas_event_handlers();
|
||||||
void reset_canvas_volumes();
|
void reset_canvas_volumes();
|
||||||
|
|
||||||
|
@ -6595,11 +6595,11 @@ void Plater::priv::set_current_canvas_as_dirty()
|
||||||
assemble_view->set_as_dirty();
|
assemble_view->set_as_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
GLCanvas3D* Plater::priv::get_current_canvas3D()
|
GLCanvas3D* Plater::priv::get_current_canvas3D(bool exclude_preview)
|
||||||
{
|
{
|
||||||
if (current_panel == view3D)
|
if (current_panel == view3D)
|
||||||
return view3D->get_canvas3d();
|
return view3D->get_canvas3d();
|
||||||
else if (current_panel == preview)
|
else if (!exclude_preview && (current_panel == preview))
|
||||||
return preview->get_canvas3d();
|
return preview->get_canvas3d();
|
||||||
else if (current_panel == assemble_view)
|
else if (current_panel == assemble_view)
|
||||||
return assemble_view->get_canvas3d();
|
return assemble_view->get_canvas3d();
|
||||||
|
@ -10295,9 +10295,9 @@ GLCanvas3D* Plater::get_assmeble_canvas3D()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLCanvas3D* Plater::get_current_canvas3D()
|
GLCanvas3D* Plater::get_current_canvas3D(bool exclude_preview)
|
||||||
{
|
{
|
||||||
return p->get_current_canvas3D();
|
return p->get_current_canvas3D(exclude_preview);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::arrange()
|
void Plater::arrange()
|
||||||
|
|
|
@ -404,7 +404,7 @@ public:
|
||||||
bool is_single_full_object_selection() const;
|
bool is_single_full_object_selection() const;
|
||||||
GLCanvas3D* canvas3D();
|
GLCanvas3D* canvas3D();
|
||||||
const GLCanvas3D * canvas3D() const;
|
const GLCanvas3D * canvas3D() const;
|
||||||
GLCanvas3D* get_current_canvas3D();
|
GLCanvas3D* get_current_canvas3D(bool exclude_preview = false);
|
||||||
GLCanvas3D* get_view3D_canvas3D();
|
GLCanvas3D* get_view3D_canvas3D();
|
||||||
GLCanvas3D* get_preview_canvas3D();
|
GLCanvas3D* get_preview_canvas3D();
|
||||||
GLCanvas3D* get_assmeble_canvas3D();
|
GLCanvas3D* get_assmeble_canvas3D();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue