Ref T345, directly update ATC stations when "in range" radio button changes

- forced update
- use component directly, no copy of settings
This commit is contained in:
Klaus Basan
2018-09-17 20:03:20 +02:00
parent c379a722e3
commit a4fc474d09
4 changed files with 27 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ namespace BlackGui
CSettingsAtcStationsInlineComponent::~CSettingsAtcStationsInlineComponent()
{ }
void CSettingsAtcStationsInlineComponent::settingsChanged()
void CSettingsAtcStationsInlineComponent::onSettingsChanged()
{
const CAtcStationsSettings s = m_atcSettings.getThreadLocal();
ui->rb_InRange->setChecked(s.showOnlyInRange());
@@ -35,9 +35,13 @@ namespace BlackGui
void CSettingsAtcStationsInlineComponent::changeSettings()
{
const bool onlyInRange = ui->rb_InRange->isChecked();
CAtcStationsSettings s = m_atcSettings.getThreadLocal();
s.setShowOnlyInRange(ui->rb_InRange->isChecked());
if (s.showOnlyInRange() && onlyInRange) { return; }
s.setShowOnlyInRange(onlyInRange);
m_atcSettings.setAndSave(s);
emit this->changed();
}
} // ns
} // ns