Display number of table rows in tab

* countChanged event
* applied in components
This commit is contained in:
Klaus Basan
2014-09-25 23:37:15 +02:00
parent 84b5cee7d8
commit ae0ef4283c
12 changed files with 119 additions and 23 deletions

View File

@@ -92,21 +92,15 @@ namespace BlackGui
if (station.getCallsign().isEmpty()) return;
if (added)
{
if (this->m_container.contains(&CAtcStation::getCallsign, station.getCallsign()))
{
this->m_container.replaceIf(&CAtcStation::getCallsign, station.getCallsign(), station);
}
else
{
this->insert(station);
}
bool c = this->m_container.contains(&CAtcStation::getCallsign, station.getCallsign());
if (!c) { this->insert(station); }
}
else
{
beginRemoveRows(QModelIndex(), 0, 0);
this->m_container.removeIf(&CAtcStation::getCallsign, station.getCallsign());
this->removeIf(&CAtcStation::getCallsign, station.getCallsign());
endRemoveRows();
}
}
}
}
} // namespace
} // namespace