mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user