mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:13:24 +00:00
planner: insert point at correct position
Instead of inserting the point at the calculated position, the DivePlannerPointsModel would append it at the end and then resort the vector. That's just silly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1e525244e6
commit
35c5ec09b7
1 changed files with 1 additions and 2 deletions
|
@ -826,8 +826,7 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_
|
|||
point.entered = entered;
|
||||
point.divemode = divemode;
|
||||
point.next = NULL;
|
||||
divepoints.append(point);
|
||||
std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan);
|
||||
divepoints.insert(divepoints.begin() + row, point);
|
||||
endInsertRows();
|
||||
return row;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue