mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fixing GCC warnings 3
This commit is contained in:
parent
2d32c80b75
commit
d9c9de8eee
15 changed files with 68 additions and 61 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue