mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Fix (un)selecting of downloaded dives
Last index was not included in the selecting or unselecting the downloaded dives. Fixes #819 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7825495620
commit
d5d42982b8
1 changed files with 4 additions and 4 deletions
|
@ -599,14 +599,14 @@ void DiveImportedModel::changeSelected(QModelIndex clickedIndex)
|
|||
|
||||
void DiveImportedModel::selectAll()
|
||||
{
|
||||
memset(checkStates, true, lastIndex - firstIndex);
|
||||
dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole);
|
||||
memset(checkStates, true, lastIndex - firstIndex + 1);
|
||||
dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
|
||||
}
|
||||
|
||||
void DiveImportedModel::selectNone()
|
||||
{
|
||||
memset(checkStates, false, lastIndex - firstIndex);
|
||||
dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole);
|
||||
memset(checkStates, false, lastIndex - firstIndex + 1);
|
||||
dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
|
||||
}
|
||||
|
||||
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const
|
||||
|
|
Loading…
Reference in a new issue