From 86636a906cc7977b0b2861d0045cfbde3b9018d9 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 6 Oct 2021 15:55:14 +0200 Subject: [PATCH] Small refactoring --- src/slic3r/GUI/GCodeViewer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 9086a86060..d76d4bed4d 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4277,9 +4277,8 @@ void GCodeViewer::render_legend(float& legend_height) set_options_visibility_from_flags(new_flags); const unsigned int diff_flags = flags ^ new_flags; - if (m_view_type == GCodeViewer::EViewType::Feedrate && - (diff_flags & (1 << static_cast(Preview::OptionType::Travel))) != 0) - wxGetApp().plater()->refresh_print(); + if (m_view_type == GCodeViewer::EViewType::Feedrate && is_flag_set(diff_flags, static_cast(Preview::OptionType::Travel))) + 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;