diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 2adf62ecdb..1ccc853cfb 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -6524,7 +6524,7 @@ void GLCanvas3D::_render_camera_target() -static void render_sla_layer_legend(const SLAPrint& print, int layer_idx, int cnv_width) +static void render_sla_layer_legend(const SLAPrint& print, int layer_idx, int cnv_width, int cnv_top) { const std::vector& areas = print.print_statistics().layers_areas; const std::vector& times = print.print_statistics().layers_times_running_total; @@ -6535,7 +6535,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(); - imgui.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); + imgui.set_next_window_pos(float(cnv_width) - imgui.get_style_scaling() * 5.f, cnv_top + 5.f, ImGuiCond_Always, 1.0f, 0.0f); ImGui::SetNextWindowBgAlpha(0.6f); imgui.begin(_u8L("Layer statistics"), ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing); @@ -6568,8 +6568,11 @@ void GLCanvas3D::_render_sla_slices() // nothing to render, return return; - if (print->finished()) - render_sla_layer_legend(*print, m_layer_slider_index, get_canvas_size().get_width()); + if (print->finished()) { + GLToolbar& collapse_toolbar = wxGetApp().plater()->get_collapse_toolbar(); + const int cnv_top = collapse_toolbar.is_enabled() ? collapse_toolbar.get_height() : 0.f; + render_sla_layer_legend(*print, m_layer_slider_index, get_canvas_size().get_width(), cnv_top); + } double clip_min_z = -m_clipping_planes[0].get_data()[3]; double clip_max_z = m_clipping_planes[1].get_data()[3];