mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cd713d421b
commit
605d085573
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue