Update Calendar on Batch Import (#4734)

When more than 20 activities are imported at once.
This commit is contained in:
Paul Johnson
2026-01-02 01:10:49 +00:00
committed by GitHub
parent 4ff62b4893
commit 9bae3a7658
3 changed files with 10 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ CalendarWindow::CalendarWindow(Context *context)
});
connect(context, &Context::filterChanged, this, &CalendarWindow::updateActivities);
connect(context, &Context::homeFilterChanged, this, &CalendarWindow::updateActivities);
connect(context, &Context::autoImportCompleted, this, &CalendarWindow::updateActivities);
connect(context, &Context::rideAdded, this, &CalendarWindow::updateActivitiesIfInRange);
connect(context, &Context::rideDeleted, this, &CalendarWindow::updateActivitiesIfInRange);
connect(context, &Context::rideChanged, this, &CalendarWindow::updateActivitiesIfInRange);

View File

@@ -181,6 +181,8 @@ class Context : public QObject
void notifyAthleteClose(QString folder, Context *context) { emit athleteClose(folder,context); }
void notifyLoadDone(QString folder, Context *context) { emit loadDone(folder, context); } // MainWindow finished
void notifyAutoImportCompleted() { emit autoImportCompleted(); }
// preset charts
void notifyPresetsChanged() { emit presetsChanged(); }
void notifyPresetSelected(int n) { emit presetSelected(n); }
@@ -285,6 +287,8 @@ class Context : public QObject
void loadDone(QString, Context*);
void athleteClose(QString, Context*);
void autoImportCompleted();
// global filter changed
void filterChanged();
void homeFilterChanged();

View File

@@ -1160,11 +1160,16 @@ RideImportWizard::abortClicked()
phaseLabel->setText(donemessage);
abortButton->setText(tr("Finish"));
aborted = false;
// notify everyone that the auto import process is complete
context->notifyAutoImportCompleted();
if (autoImportStealth) {
abortClicked(); // simulate pressing the "Finish" button - even if the window got visible
} else {
if (!isActiveWindow()) activateWindow();
}
}