Fixed color of shells in preview
This commit is contained in:
parent
5bd1a57650
commit
156019d9d0
3 changed files with 11 additions and 1 deletions
|
@ -452,6 +452,12 @@ void GCodeViewer::refresh_render_paths()
|
|||
}
|
||||
#endif // ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
|
||||
|
||||
void GCodeViewer::update_shells_color_by_extruder(const DynamicPrintConfig* config)
|
||||
{
|
||||
if (config != nullptr)
|
||||
m_shells.volumes.update_colors_by_extruder(config);
|
||||
}
|
||||
|
||||
void GCodeViewer::reset()
|
||||
{
|
||||
m_initialized = false;
|
||||
|
|
|
@ -472,6 +472,7 @@ public:
|
|||
#if ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
|
||||
void refresh_render_paths();
|
||||
#endif // ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
|
||||
void update_shells_color_by_extruder(const DynamicPrintConfig* config);
|
||||
|
||||
void reset();
|
||||
void render() const;
|
||||
|
|
|
@ -2288,8 +2288,11 @@ static void reserve_new_volume_finalize_old_volume(GLVolume& vol_new, GLVolume&
|
|||
void GLCanvas3D::load_gcode_preview(const GCodeProcessor::Result& gcode_result)
|
||||
{
|
||||
m_gcode_viewer.load(gcode_result, *this->fff_print(), m_initialized);
|
||||
if (wxGetApp().is_editor())
|
||||
|
||||
if (wxGetApp().is_editor()) {
|
||||
m_gcode_viewer.update_shells_color_by_extruder(m_config);
|
||||
_show_warning_texture_if_needed(WarningTexture::ToolpathOutside);
|
||||
}
|
||||
}
|
||||
|
||||
void GLCanvas3D::refresh_gcode_preview(const GCodeProcessor::Result& gcode_result, const std::vector<std::string>& str_tool_colors)
|
||||
|
|
Loading…
Reference in a new issue