summaryrefslogtreecommitdiffstats
path: root/core/device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/device.cpp')
-rw-r--r--core/device.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/device.cpp b/core/device.cpp
index d72f4d481..a5fa3bc2a 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -4,6 +4,7 @@
#include "subsurface-string.h"
#include "device.h"
#include "errorhelper.h" // for verbose flag
+#include "selection.h"
#include "core/settings/qPrefDiveComputer.h"
/*
@@ -305,12 +306,8 @@ extern "C" void call_for_each_dc (void *f, void (*callback)(void *, const char *
for (const DiveComputerNode &node : values) {
bool found = false;
if (select_only) {
- int j;
- struct dive *d;
- for_each_dive (j, d) {
+ for (dive *d: getDiveSelection()) {
struct divecomputer *dc;
- if (!d->selected)
- continue;
for_each_dc (d, dc) {
if (dc->deviceid == node.deviceId) {
found = true;