mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-16 08:12:39 -07:00
Fixing GCC warnings 3
This commit is contained in:
@@ -496,13 +496,6 @@ void Preview::on_combochecklist_features(wxCommandEvent& evt)
|
||||
|
||||
void Preview::on_combochecklist_options(wxCommandEvent& evt)
|
||||
{
|
||||
auto xored = [](unsigned int flags1, unsigned int flags2, unsigned int flag) {
|
||||
auto is_flag_set = [](unsigned int flags, unsigned int flag) {
|
||||
return (flags & (1 << flag)) != 0;
|
||||
};
|
||||
return !is_flag_set(flags1, flag) != !is_flag_set(flags2, flag);
|
||||
};
|
||||
|
||||
unsigned int curr_flags = m_canvas->get_gcode_options_visibility_flags();
|
||||
unsigned int new_flags = Slic3r::GUI::combochecklist_get_flags(m_combochecklist_options);
|
||||
if (curr_flags == new_flags)
|
||||
@@ -513,6 +506,13 @@ void Preview::on_combochecklist_options(wxCommandEvent& evt)
|
||||
#if ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
|
||||
m_canvas->refresh_gcode_preview_render_paths();
|
||||
#else
|
||||
auto xored = [](unsigned int flags1, unsigned int flags2, unsigned int flag) {
|
||||
auto is_flag_set = [](unsigned int flags, unsigned int flag) {
|
||||
return (flags & (1 << flag)) != 0;
|
||||
};
|
||||
return !is_flag_set(flags1, flag) != !is_flag_set(flags2, flag);
|
||||
};
|
||||
|
||||
bool skip_refresh = xored(curr_flags, new_flags, static_cast<unsigned int>(OptionType::Shells)) ||
|
||||
xored(curr_flags, new_flags, static_cast<unsigned int>(OptionType::ToolMarker));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user