diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 09:02:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 09:02:00 -0800 |
commit | 605d08557396d9e1524c3d2aedf0817b4ac32ce1 (patch) | |
tree | edd33c80fd38e3151112b7e0cf2f12c922325225 /qt-models | |
parent | cd713d421b0fdb7d28b3c19ad0e2d989e62d5ff2 (diff) | |
download | subsurface-605d08557396d9e1524c3d2aedf0817b4ac32ce1.tar.gz |
QML UI: resolve confusion about dive list model ordering
Oops, I forgot to take the sort model on top of the model into account.
Now everything should stay consistent - ListView order when accessed from
QML, but internal order when accessing the underlying array.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-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 5275ca2bb..af6825285 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); - insertDive(dive_table.nr - 1 - get_idx_by_uniq_id(d->id), new DiveObjectHelper(d)); + insertDive(get_idx_by_uniq_id(d->id), new DiveObjectHelper(d)); return QString::number(d->id); } |