From b4423aa9542ff24acb06a0cf42793584020795a8 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 30 Sep 2021 08:35:36 +0200 Subject: [PATCH] Fixes required after merge with branch et_layer_time_preview --- src/libslic3r/Technologies.hpp | 4 ++-- src/slic3r/GUI/GCodeViewer.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index d89b99512..ee64ebab4 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -62,8 +62,6 @@ #define ENABLE_RELOAD_FROM_DISK_REPLACE_FILE (1 && ENABLE_2_4_0_ALPHA2) // Enable fixing the synchronization of seams with the horizontal slider in preview #define ENABLE_FIX_SEAMS_SYNCH (1 && ENABLE_2_4_0_ALPHA2) -// Enable changes in preview layout -#define ENABLE_PREVIEW_LAYOUT (1 && ENABLE_2_4_0_ALPHA2) //==================== @@ -73,6 +71,8 @@ // Enable fixing loading of gcode files generated with SuperSlicer in GCodeViewer #define ENABLE_FIX_SUPERSLICER_GCODE_IMPORT (1 && ENABLE_2_4_0_ALPHA3) +// Enable changes in preview layout +#define ENABLE_PREVIEW_LAYOUT (1 && ENABLE_2_4_0_ALPHA3) // Enable coloring of toolpaths in preview by layer time #define ENABLE_PREVIEW_LAYER_TIME (1 && ENABLE_2_4_0_ALPHA3) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index aa9d32110..a97a2ab35 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -3683,6 +3683,10 @@ void GCodeViewer::render_legend(float& legend_height) _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), +#if ENABLE_PREVIEW_LAYER_TIME + _u8L("Layer time (linear)"), + _u8L("Layer time (logarithmic)"), +#endif // ENABLE_PREVIEW_LAYER_TIME _u8L("Tool"), _u8L("Color Print") }, view_type, ImGuiComboFlags_HeightLargest); ImGui::PopStyleColor(2); @@ -3746,7 +3750,7 @@ void GCodeViewer::render_legend(float& legend_height) visible, times[i], percents[i], max_percent, offsets, used_filaments_m[i], used_filaments_g[i], [this, role, visible]() { m_extrusions.role_visibility_flags = visible ? m_extrusions.role_visibility_flags & ~(1 << role) : m_extrusions.role_visibility_flags | (1 << role); // update buffers' render paths - refresh_render_paths(); + refresh_render_paths(false, false); wxGetApp().plater()->update_preview_moves_slider(); wxGetApp().plater()->get_current_canvas3D()->set_as_dirty(); #if !ENABLE_PREVIEW_LAYOUT @@ -4225,7 +4229,7 @@ void GCodeViewer::render_legend(float& legend_height) m_time_estimate_mode = mode; #if ENABLE_PREVIEW_LAYER_TIME if (m_view_type == EViewType::LayerTimeLinear || m_view_type == EViewType::LayerTimeLogarithmic) - refresh_render_paths(); + refresh_render_paths(false, false); #endif // ENABLE_PREVIEW_LAYER_TIME wxGetApp().plater()->get_current_canvas3D()->set_as_dirty(); wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();