From b376919d83e3f5febed21093ce653f4744e2fe98 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 23 May 2024 16:18:15 +0200 Subject: [PATCH] DSForLayers: Fixed a preview of estimated printer times + Fixed position of the "Layer statistics" window --- src/slic3r/GUI/DoubleSliderForLayers.cpp | 3 +-- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/DoubleSliderForLayers.cpp b/src/slic3r/GUI/DoubleSliderForLayers.cpp index d27a5ac435..15fa59b462 100644 --- a/src/slic3r/GUI/DoubleSliderForLayers.cpp +++ b/src/slic3r/GUI/DoubleSliderForLayers.cpp @@ -117,8 +117,7 @@ void DSForLayers::SetLayersTimes(const std::vector& layers_times) { m_ticks.is_wipe_tower = false; m_layers_times = layers_times; - for (size_t i = 1; i < m_layers_times.size(); i++) - m_layers_times[i] += m_layers_times[i - 1]; + std::copy(layers_times.begin(), layers_times.end(), m_layers_times.begin()); } void DSForLayers::SetDrawMode(bool is_sla_print, bool is_sequential_print) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 378c886843..fff19f2d84 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -6263,7 +6263,7 @@ static void render_sla_layer_legend(const SLAPrint& print, int layer_idx, int cn const double time_until_layer = times[layer_idx]; ImGuiWrapper& imgui = *wxGetApp().imgui(); - ImGuiPureWrap::set_next_window_pos(float(cnv_width) - imgui.get_style_scaling() * 5.f, imgui.get_style_scaling() * 55.f, ImGuiCond_Always, 1.0f, 0.0f); + ImGuiPureWrap::set_next_window_pos(float(cnv_width) - imgui.get_style_scaling() * 5.f, 5.f, ImGuiCond_Always, 1.0f, 0.0f); ImGui::SetNextWindowBgAlpha(0.6f); ImGuiPureWrap::begin(_u8L("Layer statistics"), ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing);