statistics: select multiple dives in scatter-plot by shift-clicking

Somewhat improve selection mechanics in the scatter-plot by
allowing additional selections with shift-clicking. When the
dives under the mouse are already selected, then deselect them.
This appears to be a rather common UI idiom in desktop
applications.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-31 21:30:51 +01:00 committed by Dirk Hohndel
parent d85b321784
commit e38b78b2aa
10 changed files with 40 additions and 12 deletions

View file

@ -81,8 +81,9 @@ void StatsView::mousePressEvent(QMouseEvent *event)
}
}
bool shiftPressed = event->modifiers() & Qt::ShiftModifier;
for (auto &series: series)
series->selectItemsUnderMouse(pos);
series->selectItemsUnderMouse(pos, shiftPressed);
}
void StatsView::mouseReleaseEvent(QMouseEvent *)