From 05293feb8f859e5a1803a0c8258897c377e1e046 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Sat, 12 Mar 2022 17:30:00 +0100 Subject: [PATCH] Initialize sim connection status for logincomponent When using distributed mode and the simulator is already connected to swiftCore, the GUI will not trigger the update on the login component via the simulatorStatusChanged signal. Therefore we will trigger the initial update manually (same is already done for the simulator connection LED). --- src/blackgui/components/logincomponent.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/blackgui/components/logincomponent.cpp b/src/blackgui/components/logincomponent.cpp index 0c1b75ab4..ef666c777 100644 --- a/src/blackgui/components/logincomponent.cpp +++ b/src/blackgui/components/logincomponent.cpp @@ -171,6 +171,11 @@ namespace BlackGui::Components this->onWebServiceDataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFinished, -1, {}); this->reloadOtherServersSetup(); + if (sGui && sGui->getIContextSimulator()) + { + this->onSimulatorStatusChanged(sGui->getIContextSimulator()->getSimulatorStatus()); + } + connect(ui->pb_OverrideCredentialsVatsim, &QPushButton::clicked, this, &CLoginComponent::overrideCredentialsToPilot); connect(ui->pb_OverrideCredentialsOtherServers, &QPushButton::clicked, this, &CLoginComponent::overrideCredentialsToPilot);