diff options
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 804bf9b9b..9a9330473 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -969,15 +969,8 @@ void DiveListView::matchImagesToDives(QStringList fileNames) return; updateLastImageTimeOffset(shiftDialog.amount()); - Q_FOREACH (const QString &fileName, fileNames) { - int j = 0; - struct dive *dive; - for_each_dive (j, dive) { - if (!dive->selected) - continue; - dive_create_picture(dive, qPrintable(fileName), shiftDialog.amount(), shiftDialog.matchAll()); - } - } + for (const QString &fileName: fileNames) + create_picture(qPrintable(fileName), shiftDialog.amount(), shiftDialog.matchAll()); mark_divelist_changed(true); copy_dive(current_dive, &displayed_dive); |