Qt/GraphicsControls: Fix more random crashes

This commit is contained in:
spycrab 2018-05-04 13:51:55 +02:00
parent a5e410b7c9
commit 300c3970f3
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();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
bool old = blockSignals(true);
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();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
bool old = blockSignals(true);
setCurrentIndex(Config::Get(m_setting));
blockSignals(old);
});
}

View File

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