mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Planner: fix an enduring assert on startup
qt 5.3, win7 64bit. beginRemoveRows() asserts in removeSelectedPoints() because rowCount() - 1, becomes less than firstRow. This needs a check in removeSelectedPoints() if the number of passed rows is zero. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f6f2c4e929
commit
028568555f
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,8 @@ bool intLessThan(int a, int b)
|
|||
}
|
||||
void DivePlannerPointsModel::removeSelectedPoints(const QVector<int> &rows)
|
||||
{
|
||||
if (!rows.count())
|
||||
return;
|
||||
int firstRow = rowCount() - rows.count();
|
||||
QVector<int> v2 = rows;
|
||||
std::sort(v2.begin(), v2.end(), intLessThan);
|
||||
|
|
Loading…
Add table
Reference in a new issue