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
@ -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…
x
Reference in New Issue
Block a user