mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert 4f9705f3f5
It solves #784, but introduces #846. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b47d8d5992
commit
3617928621
1 changed files with 0 additions and 9 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Reference in a new issue