From 2d32c80b75437d4aa94fa7a47e4e13cc826ccc79 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 14 Jan 2021 13:00:03 +0100 Subject: Fixing GCC warnings 2 --- src/slic3r/GUI/OptionsGroup.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/slic3r/GUI/OptionsGroup.cpp') 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 -- cgit v1.2.3