diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-31 21:30:51 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-13 13:02:54 -0800 |
commit | e38b78b2aa787e3d1de97fb737601dc30a7fad6b (patch) | |
tree | edac9dafd1bdb94acc184ae767ec9afb80cd808e /stats/statsview.cpp | |
parent | d85b3217840656bf371cd64264ee472a68c3141a (diff) | |
download | subsurface-e38b78b2aa787e3d1de97fb737601dc30a7fad6b.tar.gz |
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>
Diffstat (limited to 'stats/statsview.cpp')
-rw-r--r-- | stats/statsview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp index bf4ecdc6a..9ee0f0e44 100644 --- a/stats/statsview.cpp +++ b/stats/statsview.cpp @@ -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 *) |