mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Update Calendar on Batch Import (#4734)
When more than 20 activities are imported at once.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user