diff options
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index d6fb09573..ad58f9c2f 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -128,9 +128,17 @@ void LocationInformationModel::update() beginResetModel(); internalRowCount = dive_site_table.nr; qSort(dive_site_table.dive_sites, dive_site_table.dive_sites + dive_site_table.nr, dive_site_less_than); + locationNames.clear(); + for (int i = 0; i < internalRowCount; i++) + locationNames << QString(dive_site_table.dive_sites[i]->name); endResetModel(); } +QStringList LocationInformationModel::allSiteNames() const +{ + return(locationNames); +} + bool LocationInformationModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (!index.isValid() || index.row() < 2) |