summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 4752a9f2b..00e522602 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -988,7 +988,8 @@ int DivePlannerPointsModel::addStop(int meters, int minutes, const QString& gas,
void DivePlannerPointsModel::editStop(int row, divedatapoint newData)
{
divepoints[row] = newData;
- emit dataChanged(createIndex(row, 0), createIndex(row, COLUMNS-1));
+ std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan);
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
divedatapoint DivePlannerPointsModel::at(int row)