Dive d/l selection UI: setImportedDivesIndexes implementation

Here we list in the model what are our dives, inside the dive_table.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-08 10:15:34 -02:00 committed by Dirk Hohndel
parent 9ee615bca3
commit f7abde84af

View file

@ -521,5 +521,10 @@ QVariant DiveImportedModel::data(const QModelIndex& model, int role) const
void DiveImportedModel::setImportedDivesIndexes(int first, int last)
{
beginRemoveRows(QModelIndex(), 0, lastIndex - firstIndex);
endRemoveRows();
beginInsertRows(QModelIndex(), 0, last - first);
lastIndex = last;
firstIndex = first;
endInsertRows();
}