diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-14 15:00:03 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-29 12:46:52 +0300 |
commit | 2d32c80b75437d4aa94fa7a47e4e13cc826ccc79 (patch) | |
tree | b74fbe1c954ca038bb0b10fbe5e64aa9e50e073a /src/slic3r/GUI/OptionsGroup.cpp | |
parent | b5280fbed97404fd2ef75692102ff1f3963c58b3 (diff) |
Fixing GCC warnings 2
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r-- | src/slic3r/GUI/OptionsGroup.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 5f9391645..8f5e20241 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -250,9 +250,8 @@ void OptionsGroup::activate_line(Line& line) if (custom_ctrl) m_use_custom_ctrl_as_parent = true; - // if we have an extra column, build it - if (extra_column) - { + // if we have an extra column, build it + if (extra_column) { m_extra_column_item_ptrs.push_back(extra_column(this->ctrl_parent(), line)); grid_sizer->Add(m_extra_column_item_ptrs.back(), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 3); } @@ -309,8 +308,8 @@ void OptionsGroup::activate_line(Line& line) auto sizer = new wxBoxSizer(wxHORIZONTAL); if (!custom_ctrl) grid_sizer->Add(sizer, 0, wxEXPAND | (staticbox ? wxALL : wxBOTTOM | wxTOP | wxLEFT), staticbox ? 0 : 1); - // If we have a single option with no sidetext just add it directly to the grid sizer - if (option_set.size() == 1 && option_set.front().opt.sidetext.size() == 0 && + // If we have a single option with no sidetext just add it directly to the grid sizer + if (option_set.size() == 1 && option_set.front().opt.sidetext.size() == 0 && option_set.front().opt.label.empty() && option_set.front().side_widget == nullptr && line.get_extra_widgets().size() == 0) { const auto& option = option_set.front(); @@ -319,16 +318,16 @@ void OptionsGroup::activate_line(Line& line) if (!custom_ctrl) { if (is_window_field(field)) sizer->Add(field->getWindow(), option.opt.full_width ? 1 : 0, - wxBOTTOM | wxTOP | (option.opt.full_width ? wxEXPAND : wxALIGN_CENTER_VERTICAL), (wxOSX || !staticbox) ? 0 : 2); + wxBOTTOM | wxTOP | (option.opt.full_width ? int(wxEXPAND) : int(wxALIGN_CENTER_VERTICAL)), (wxOSX || !staticbox) ? 0 : 2); if (is_sizer_field(field)) - sizer->Add(field->getSizer(), 1, option.opt.full_width ? wxEXPAND : wxALIGN_CENTER_VERTICAL, 0); + sizer->Add(field->getSizer(), 1, (option.opt.full_width ? int(wxEXPAND) : int(wxALIGN_CENTER_VERTICAL)), 0); } return; } for (auto opt : option_set) { ConfigOptionDef option = opt.opt; - wxSizer* sizer_tmp = sizer; + wxSizer* sizer_tmp = sizer; // add label if any if (!option.label.empty() && !custom_ctrl) { //! To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1 |