Skip to content

Commit

Permalink
Fixes the interval for appendices
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmi committed Feb 28, 2018
1 parent 37005f6 commit ee8f7a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/questionnairedialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,12 @@ void QuestionnaireDialog::accept() {
QDateTime cur_time = QDateTime::currentDateTime();
activity_->SetCurTime(cur_time);
activity_->SetLastTime(settings.value("lastLogTime").toDateTime());
activity_->SetIntervalTime(
qCeil(cur_time.secsTo(activity_->GetLastTime()) / -60.0));
if (scheduler_ == 1) {
activity_->SetIntervalTime(log_interval_spin_box_->value());
} else {
activity_->SetIntervalTime(
qCeil(cur_time.secsTo(activity_->GetLastTime()) / -60.0));
}
activity_->SetSavedEvents(no_logged_activities_);
activity_->SetType(act_form_->GetText());
settings.setValue("lastLogTime", QDateTime::currentDateTime());
Expand Down

0 comments on commit ee8f7a5

Please sign in to comment.