diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 04:50:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 04:50:00 -0800 |
commit | 62f54b54a2aa625c9568ae1b3d954489a6cf08c0 (patch) | |
tree | db890d152d49dc62f04e5a110cfa981cc332e6ab /qt-models/divelistmodel.cpp | |
parent | ce83357889659c11e71e09cc1830f26f8540c08e (diff) | |
download | subsurface-62f54b54a2aa625c9568ae1b3d954489a6cf08c0.tar.gz |
QML UI: create a chronological dive list when manually adding dive
The dive list might contain dives in the future, don't add the new dive to
then end but instead add it at the correct spot in the list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r-- | qt-models/divelistmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index 7e1844f3e..5275ca2bb 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -141,7 +141,7 @@ QString DiveListModel::startAddDive() d->number = nr; d->dc.model = strdup("manually added dive"); add_single_dive(-1, d); - addDive(d); + insertDive(dive_table.nr - 1 - get_idx_by_uniq_id(d->id), new DiveObjectHelper(d)); return QString::number(d->id); } |