diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 493188325..1099e6785 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -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; }