Merge pull request #6749 from spycrab/qt_gcontrols_crash

Qt/GraphicsControls: Fix more random crashes
This commit is contained in:
Pierre Bourdon 2018-05-05 03:02:43 +02:00 committed by GitHub
commit 798639291f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -20,7 +20,10 @@ GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo<bool>&
QFont bf = font(); QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf); setFont(bf);
bool old = blockSignals(true);
setChecked(Config::Get(m_setting) ^ m_reverse); setChecked(Config::Get(m_setting) ^ m_reverse);
blockSignals(old);
}); });
} }

View File

@ -19,7 +19,10 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigI
QFont bf = font(); QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf); setFont(bf);
bool old = blockSignals(true);
setCurrentIndex(Config::Get(m_setting)); setCurrentIndex(Config::Get(m_setting));
blockSignals(old);
}); });
} }

View File

@ -18,7 +18,10 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInf
QFont bf = font(); QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf); setFont(bf);
bool old = blockSignals(true);
setChecked(Config::Get(m_setting) == m_value); setChecked(Config::Get(m_setting) == m_value);
blockSignals(old);
}); });
} }