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:
parent
b32202e597
commit
2e54648b97
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue