From e02a25cf1e6ed07ef8b30259a875b907d205110f Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 5 Oct 2021 15:28:43 +0200 Subject: [PATCH] Follow-up of 57a0b23a0756246c481f8500944ac482bc4b32ed - Tech ENABLE_PREVIEW_LAYOUT - Fixed logic to avoid resetting the preview's horizontal slider when toggling options --- src/slic3r/GUI/GCodeViewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 5a17ae7f3..9c0550495 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4276,7 +4276,9 @@ void GCodeViewer::render_legend(float& legend_height) unsigned int new_flags = set_flag(flags, flag, !active); set_options_visibility_from_flags(new_flags); - wxGetApp().plater()->get_current_canvas3D()->refresh_gcode_preview_render_paths(true, true); + bool keep_first = m_sequential_view.current.first != m_sequential_view.global.first; + bool keep_last = m_sequential_view.current.last != m_sequential_view.global.last; + wxGetApp().plater()->get_current_canvas3D()->refresh_gcode_preview_render_paths(keep_first, keep_last); wxGetApp().plater()->update_preview_moves_slider(); }