diff options
Diffstat (limited to 'stats/boxseries.cpp')
-rw-r--r-- | stats/boxseries.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stats/boxseries.cpp b/stats/boxseries.cpp index 06aa8b095..564842001 100644 --- a/stats/boxseries.cpp +++ b/stats/boxseries.cpp @@ -7,6 +7,7 @@ #include "statstranslations.h" #include "statsview.h" #include "zvalues.h" +#include "core/selection.h" #include <QLocale> @@ -141,3 +142,13 @@ void BoxSeries::unhighlight() items[highlighted]->highlight(false); highlighted = -1; } + +void BoxSeries::selectItemsUnderMouse(const QPointF &pos) +{ + int index = getItemUnderMouse(pos); + if (index < 0) + return setSelection({}, nullptr); + + const std::vector<dive *> &dives = items[index]->q.dives; + setSelection(dives, dives.empty() ? nullptr : dives.front()); +} |