Fixed Editing of the Template custom Gcode

Fixed reloading of the legend, when preview type was changed
This commit is contained in:
YuSanka 2020-06-09 16:12:57 +02:00
parent f74b1c6547
commit bf9462749f
2 changed files with 15 additions and 7 deletions

View file

@ -578,10 +578,10 @@ void Preview::update_view_type(bool slice_completed)
const wxString& choice = !wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes.empty() /*&&
(wxGetApp().extruders_edited_cnt()==1 || !slice_completed) */?
_(L("Color Print")) :
_L("Color Print") :
config.option<ConfigOptionFloats>("wiping_volumes_matrix")->values.size() > 1 ?
_(L("Tool")) :
_(L("Feature type"));
_L("Tool") :
_L("Feature type");
int type = m_choice_view_type->FindString(choice);
if (m_choice_view_type->GetSelection() != type) {
@ -590,6 +590,8 @@ void Preview::update_view_type(bool slice_completed)
m_gcode_preview_data->extrusion.view_type = (GCodePreviewData::Extrusion::EViewType)type;
m_preferred_color_mode = "feature";
}
reload_print();
}
void Preview::create_double_slider()
@ -618,8 +620,6 @@ void Preview::create_double_slider()
m_schedule_background_process();
update_view_type(false);
reload_print();
});
}