diff options
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index cf4b9b0ae..fb4d3750b 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -222,17 +222,8 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton *button) amount = ui.timeEdit->time().hour() * 3600 + ui.timeEdit->time().minute() * 60; if (ui.backwards->isChecked()) amount *= -1; - if (amount != 0) { - // DANGER, DANGER - this could get our dive_table unsorted... - int i; - struct dive *d; - QVector<dive *> affectedDives; - for_each_dive (i, d) { - if (d->selected) - affectedDives.append(d); - } - Command::shiftTime(affectedDives, amount); - } + if (amount != 0) + Command::shiftTime(getDiveSelection(), amount); } } |