mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T345, clear online views when disconnected
This commit is contained in:
@@ -282,6 +282,7 @@ namespace BlackGui
|
||||
else if (INetwork::isDisconnectedStatus(to))
|
||||
{
|
||||
m_updateTimer.stop();
|
||||
this->clearOnlineViews();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +403,7 @@ namespace BlackGui
|
||||
}
|
||||
if (stationClicked.hasMetar())
|
||||
{
|
||||
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
|
||||
if (!infoMessage.isEmpty()) { infoMessage.append("\n\n"); }
|
||||
infoMessage.append(stationClicked.getMetar().getMessage());
|
||||
}
|
||||
ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
||||
@@ -430,5 +431,12 @@ namespace BlackGui
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextNetwork()) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
void CAtcStationComponent::clearOnlineViews()
|
||||
{
|
||||
ui->tvp_AtcStationsOnline->clear();
|
||||
QAbstractItemModel *treeModelOld = (ui->tvp_AtcStationsOnlineTree->model());
|
||||
if (treeModelOld) { CGuiUtility::clearModel(treeModelOld); }
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user