mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive list: work around odd problem with selections
According to the documentation clearSelection() should emit selectionChanged() - but I can verify in the debugger that sometimes this doesn't appear to happen - consequently our notion of what's selected gets confused. To work around this, after calling clearSelection() we simply manuall deselect all dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dbb86374e0
commit
10e5675151
1 changed files with 7 additions and 2 deletions
|
@ -190,8 +190,13 @@ void DiveListView::selectTrip(dive_trip_t *trip)
|
|||
void DiveListView::unselectDives()
|
||||
{
|
||||
selectionModel()->clearSelection();
|
||||
if (amount_selected != 0)
|
||||
qDebug() << "selection information inconsistent";
|
||||
// clearSelection should emit selectionChanged() but sometimes that
|
||||
// appears not to happen
|
||||
int i;
|
||||
struct dive *dive;
|
||||
for_each_dive(i, dive) {
|
||||
deselect_dive(i);
|
||||
}
|
||||
}
|
||||
|
||||
QList<dive_trip_t *> DiveListView::selectedTrips()
|
||||
|
|
Loading…
Add table
Reference in a new issue