mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Fixed a multi-material painting gizmo crash when extruders colors aren't initialized, which happens when switching between SLA and FDM printer.
This commit is contained in:
@@ -125,7 +125,7 @@ void GLGizmoMmuSegmentation::set_painter_gizmo_data(const Selection &selection)
|
|||||||
{
|
{
|
||||||
GLGizmoPainterBase::set_painter_gizmo_data(selection);
|
GLGizmoPainterBase::set_painter_gizmo_data(selection);
|
||||||
|
|
||||||
if (m_state != On)
|
if (m_state != On || wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptFFF || wxGetApp().extruders_edited_cnt() <= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ModelObject *model_object = m_c->selection_info()->model_object();
|
ModelObject *model_object = m_c->selection_info()->model_object();
|
||||||
@@ -404,6 +404,10 @@ void GLGizmoMmuSegmentation::init_model_triangle_selectors()
|
|||||||
const ModelObject *mo = m_c->selection_info()->model_object();
|
const ModelObject *mo = m_c->selection_info()->model_object();
|
||||||
m_triangle_selectors.clear();
|
m_triangle_selectors.clear();
|
||||||
|
|
||||||
|
// Don't continue when extruders colors are not initialized
|
||||||
|
if(m_original_extruders_colors.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
for (const ModelVolume *mv : mo->volumes) {
|
for (const ModelVolume *mv : mo->volumes) {
|
||||||
if (!mv->is_model_part())
|
if (!mv->is_model_part())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user