Follow-up of dc6f97a6ad
-> Fixed toolpaths visualization when new slicing is required
This commit is contained in:
parent
7207f215e9
commit
289f7a14a0
3 changed files with 14 additions and 5 deletions
|
@ -510,9 +510,11 @@ void Preview::reload_print(bool keep_volumes)
|
||||||
!keep_volumes)
|
!keep_volumes)
|
||||||
{
|
{
|
||||||
m_canvas->reset_volumes();
|
m_canvas->reset_volumes();
|
||||||
#if !ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
m_canvas->reset_gcode_toolpaths();
|
||||||
|
#else
|
||||||
m_canvas->reset_legend_texture();
|
m_canvas->reset_legend_texture();
|
||||||
#endif // !ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
m_loaded = false;
|
m_loaded = false;
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
m_volumes_cleanup_required = false;
|
m_volumes_cleanup_required = false;
|
||||||
|
@ -761,7 +763,7 @@ void Preview::on_checkbox_legend(wxCommandEvent& evt)
|
||||||
}
|
}
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
void Preview::update_view_type(bool slice_completed)
|
void Preview::update_view_type(bool keep_volumes)
|
||||||
{
|
{
|
||||||
const DynamicPrintConfig& config = wxGetApp().preset_bundle->project_config;
|
const DynamicPrintConfig& config = wxGetApp().preset_bundle->project_config;
|
||||||
|
|
||||||
|
@ -785,7 +787,11 @@ void Preview::update_view_type(bool slice_completed)
|
||||||
m_preferred_color_mode = "feature";
|
m_preferred_color_mode = "feature";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
reload_print(keep_volumes);
|
||||||
|
#else
|
||||||
reload_print();
|
reload_print();
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
|
|
@ -186,7 +186,7 @@ Preview(wxWindow* parent, Model* model, DynamicPrintConfig* config,
|
||||||
void edit_double_slider(wxKeyEvent& evt);
|
void edit_double_slider(wxKeyEvent& evt);
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
void update_view_type(bool slice_completed);
|
void update_view_type(bool keep_volumes);
|
||||||
|
|
||||||
bool is_loaded() const { return m_loaded; }
|
bool is_loaded() const { return m_loaded; }
|
||||||
|
|
||||||
|
|
|
@ -5092,10 +5092,13 @@ void Plater::reslice()
|
||||||
|
|
||||||
if (clean_gcode_toolpaths)
|
if (clean_gcode_toolpaths)
|
||||||
reset_gcode_toolpaths();
|
reset_gcode_toolpaths();
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
|
||||||
|
|
||||||
|
// update type of preview
|
||||||
|
p->preview->update_view_type(!clean_gcode_toolpaths);
|
||||||
|
#else
|
||||||
// update type of preview
|
// update type of preview
|
||||||
p->preview->update_view_type(true);
|
p->preview->update_view_type(true);
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::reslice_SLA_supports(const ModelObject &object, bool postpone_error_messages)
|
void Plater::reslice_SLA_supports(const ModelObject &object, bool postpone_error_messages)
|
||||||
|
|
Loading…
Add table
Reference in a new issue