diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2021-10-06 16:49:25 +0300 |
---|---|---|
committer | enricoturri1966 <enricoturri@seznam.cz> | 2021-10-06 16:49:25 +0300 |
commit | 077abe117a24fa8e3bf03590702afa368cf31573 (patch) | |
tree | bc6046d5aad74b034f7b05dfe204482fd370ddea /src/slic3r/GUI | |
parent | 7c01817ead66cb48e250f4cdfc7249a811e1c27a (diff) |
Port of 2afdc66dfb84f512a3f72b0a18ceb51873d779c5 and dbad87fb42343a8c9eaf51897bfe316a82c344d7 into tech ENABLE_PREVIEW_LAYOUT
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r-- | src/slic3r/GUI/GCodeViewer.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 9c0550495..9086a8606 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4276,9 +4276,15 @@ void GCodeViewer::render_legend(float& legend_height) unsigned int new_flags = set_flag(flags, flag, !active); set_options_visibility_from_flags(new_flags); - 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); + const unsigned int diff_flags = flags ^ new_flags; + if (m_view_type == GCodeViewer::EViewType::Feedrate && + (diff_flags & (1 << static_cast<unsigned int>(Preview::OptionType::Travel))) != 0) + wxGetApp().plater()->refresh_print(); + else { + 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(); } |