[PATCH 1/4] Revert 4f9705f3f5

Lubomir I. Ivanov neolit123 at gmail.com
Thu Mar 12 17:32:48 PDT 2015


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

It solves #784, but introduces #846.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 qt-ui/diveplanner.cpp | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 7a35daa..db00721 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -44,15 +44,6 @@ void DivePlannerPointsModel::removeSelectedPoints(const QVector<int> &rows)
 	QVector<int> v2 = rows;
 	std::sort(v2.begin(), v2.end(), intLessThan);
 
-	/*
-	 * If we end up having divepoints that are not within the dive
-	 * profile, we need to just skip the removal to prevent
-	 * crashing due to index out of range.
-	 */
-
-	if (rowCount() >= divepoints.count())
-		return;
-
 	beginRemoveRows(QModelIndex(), firstRow, rowCount() - 1);
 	for (int i = v2.count() - 1; i >= 0; i--) {
 		divepoints.remove(v2[i]);
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list