Fixed couple of warnings in Field.cpp, GUI_App.cpp and OptionsGroup.cpp

This commit is contained in:
YuSanka 2019-09-03 10:59:04 +02:00
parent f73976ec8f
commit 6befe7099b
3 changed files with 20 additions and 16 deletions

View file

@ -457,8 +457,9 @@ void ConfigOptionsGroup::Show(const bool show)
bool ConfigOptionsGroup::update_visibility(ConfigOptionMode mode) {
if (m_options_mode.empty())
return true;
if (m_grid_sizer->GetEffectiveRowsCount() != m_options_mode.size() &&
m_options_mode.size() == 1)
int opt_mode_size = m_options_mode.size();
if (m_grid_sizer->GetEffectiveRowsCount() != opt_mode_size &&
opt_mode_size == 1)
return m_options_mode[0] <= mode;
Show(true);
@ -476,7 +477,7 @@ bool ConfigOptionsGroup::update_visibility(ConfigOptionMode mode) {
coef+= cols;
}
if (hidden_row_cnt == m_options_mode.size()) {
if (hidden_row_cnt == opt_mode_size) {
sizer->ShowItems(false);
return false;
}