diff --git a/src/blackgui/components/atcstationcomponent.cpp b/src/blackgui/components/atcstationcomponent.cpp index 32a761547..4900057ff 100644 --- a/src/blackgui/components/atcstationcomponent.cpp +++ b/src/blackgui/components/atcstationcomponent.cpp @@ -162,10 +162,14 @@ namespace BlackGui // update if (this->m_timestampOnlineStationsChanged > this->m_timestampLastReadOnlineStations) { - const CAtcStationList onlineStations = - // test: filter by frequency, see if this is better - // sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom() + // sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom() + const CAtcStationsSettings settings = m_settingsAtc.getThreadLocal(); + CAtcStationList onlineStations = sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidFrequency(); + if (settings.showOnlyInRange()) + { + onlineStations.removeIfOutsideRange(); + } ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(onlineStations); this->m_timestampLastReadOnlineStations = QDateTime::currentDateTimeUtc(); @@ -309,7 +313,7 @@ namespace BlackGui void CAtcStationComponent::ps_settingsChanged() { - const CViewUpdateSettings settings = this->m_settings.get(); + const CViewUpdateSettings settings = this->m_settingsView.get(); const int ms = settings.getAtcUpdateTime().toMs(); this->m_updateTimer.setInterval(ms); } diff --git a/src/blackgui/components/atcstationcomponent.h b/src/blackgui/components/atcstationcomponent.h index 28525cf41..89c736e4c 100644 --- a/src/blackgui/components/atcstationcomponent.h +++ b/src/blackgui/components/atcstationcomponent.h @@ -16,6 +16,7 @@ #include "blackgui/blackguiexport.h" #include "blackgui/components/enablefordockwidgetinfoarea.h" #include "blackgui/settings/viewupdatesettings.h" +#include "blackgui/settings/atcstationssettings.h" #include "blackmisc/aviation/atcstation.h" #include "blackmisc/aviation/comsystem.h" #include "blackmisc/identifiable.h" @@ -136,7 +137,8 @@ namespace BlackGui QDateTime m_timestampOnlineStationsChanged; //!< stations marked as changed QDateTime m_timestampLastReadBookedStations; //!< stations read QDateTime m_timestampBookedStationsChanged; //!< stations marked as changed - BlackMisc::CSettingReadOnly m_settings { this, &CAtcStationComponent::ps_settingsChanged }; + BlackMisc::CSettingReadOnly m_settingsView { this, &CAtcStationComponent::ps_settingsChanged }; + BlackMisc::CSettingReadOnly m_settingsAtc { this, &CAtcStationComponent::ps_settingsChanged }; }; } // namespace } // namespace diff --git a/src/blackgui/components/atcstationcomponent.ui b/src/blackgui/components/atcstationcomponent.ui index f2923b132..193831579 100644 --- a/src/blackgui/components/atcstationcomponent.ui +++ b/src/blackgui/components/atcstationcomponent.ui @@ -61,6 +61,16 @@ + + + + QFrame::StyledPanel + + + QFrame::Raised + + + @@ -288,6 +298,12 @@ QTableView
blackgui/views/atcstationview.h
+ + BlackGui::Components::CSettingsAtcStationsInlineComponent + QFrame +
blackgui/components/settingsatcstationsinlinecomponent.h
+ 1 +