mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Migrate code to for_each_dive and for_each_dc
[Dirk Hohndel: this overlapped with my commit 09e7c61fee
("Consistently
use for_each_dive (and use it correctly)") so I took the
pieces that I had missed]
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
91c20357f5
commit
05d9cc409c
6 changed files with 9 additions and 21 deletions
|
@ -887,8 +887,7 @@ void DiveListView::loadImages()
|
|||
for_each_dive(j, dive) {
|
||||
if (!dive->selected)
|
||||
continue;
|
||||
dc = &(dive->dc);
|
||||
while (dc) {
|
||||
for_each_dc(dive, dc) {
|
||||
when = dc->when ? dc->when : dive->when;
|
||||
duration_s = dc->duration.seconds ? dc->duration.seconds : dive->duration.seconds;
|
||||
if (when - 3600 < imagetime && when + duration_s + 3600 > imagetime) {
|
||||
|
@ -909,7 +908,6 @@ void DiveListView::loadImages()
|
|||
MainWindow::instance()->refreshDisplay();
|
||||
MainWindow::instance()->graphics()->replot();
|
||||
}
|
||||
dc = dc->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue