Using the same optimizations as in category tree view (Ref T472)

* isEmpty
* digest signal
This commit is contained in:
Klaus Basan
2019-02-05 21:49:00 +01:00
committed by Mat Sutcliffe
parent fe05c2287b
commit c123c8bbca
3 changed files with 23 additions and 8 deletions

View File

@@ -47,11 +47,8 @@ namespace BlackGui
void CAtcStationTreeModel::updateContainer(const CAtcStationList &stations)
{
if (stations.isEmpty())
{
CAtcStationTreeModel::clear();
return;
}
this->clear();
if (stations.isEmpty()) { return; }
m_stations = stations.sortedByAtcSuffixSortOrderAndDistance();
m_stationsBySuffix = m_stations.splitPerSuffix();