Permalink
Browse files

Merge pull request #6717 from spycrab/issue_11039

Qt/GraphicsControls: Reload values when settings are changed
  • Loading branch information...
lioncash committed Apr 30, 2018
2 parents 1ce75ce + 417d191 commit ad836b9071b6ad0341bfb6a36b24862bf7df9f79
@@ -20,6 +20,7 @@ GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo<bool>&
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
setChecked(Config::Get(m_setting) ^ m_reverse);
});
}
@@ -19,6 +19,7 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigI
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
setCurrentIndex(Config::Get(m_setting));
});
}
@@ -13,6 +13,13 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInf
{
setChecked(Config::Get(m_setting) == m_value);
connect(this, &QRadioButton::toggled, this, &GraphicsRadioInt::Update);
connect(&Settings::Instance(), &Settings::ConfigChanged, [this] {
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
setChecked(Config::Get(m_setting) == m_value);
});
}
void GraphicsRadioInt::Update()
@@ -23,6 +23,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::ConfigInf
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
setFont(bf);
setValue(Config::Get(m_setting));
});
}

0 comments on commit ad836b9

Please sign in to comment.