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
@ -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…
x
Reference in New Issue
Block a user