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).
This commit is contained in:
Lars Toenning
2022-03-12 17:30:00 +01:00
committed by Mat Sutcliffe
parent 57ab108a06
commit 20b8adcf0b

View File

@@ -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);