From 20b8adcf0b49f4ab4370e05157bb009f33108322 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 2ac4eb662..82aa77ec3 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);