mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Finetuning
* Improved reloading of booked stations * Improved error reporting in data file reader * Finetuning of network context, mostly reg. VATSIM data file
This commit is contained in:
@@ -71,13 +71,22 @@ namespace BlackGui
|
||||
Q_ASSERT(this->ui->tvp_AtcStationsBooked);
|
||||
Q_ASSERT(this->getIContextNetwork());
|
||||
|
||||
this->ui->tvp_AtcStationsBooked->update(this->getIContextNetwork()->getAtcStationsBooked());
|
||||
this->m_timestampLastReadBookedStations = QDateTime::currentDateTimeUtc();
|
||||
QObject *sender = QObject::sender();
|
||||
if (sender == this->ui->pb_ReloadAtcStationsBooked && this->getIContextNetwork())
|
||||
{
|
||||
this->getIContextNetwork()->readAtcBookingsFromSource(); // trigger new read
|
||||
QTimer::singleShot(7500, this, SLOT(reloadAtcStationsBooked())); // deferred loading
|
||||
}
|
||||
else
|
||||
{
|
||||
this->ui->tvp_AtcStationsBooked->update(this->getIContextNetwork()->getAtcStationsBooked());
|
||||
this->m_timestampLastReadBookedStations = QDateTime::currentDateTimeUtc();
|
||||
}
|
||||
}
|
||||
|
||||
void CAtcStationComponent::changedAtcStationsOnline()
|
||||
{
|
||||
// just update timestamp, data will be pulled by time
|
||||
// just update timestamp, data will be pulled by time
|
||||
// the timestamp will tell if there are newer data
|
||||
this->m_timestampOnlineStationsChanged = QDateTime::currentDateTimeUtc();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user