Don't update intervals when metadata changes

It may be to expensive in some cases making the
user interfase too slow when updating fields
for little benefit, intervals are updated on save.
This commit is contained in:
Alejandro Martinez
2026-03-28 16:41:17 -03:00
parent c4a78cea28
commit 753758f893
2 changed files with 3 additions and 3 deletions

View File

@@ -584,7 +584,7 @@ bool RideItem::hasLinkedActivity() const
}
void
RideItem::refresh()
RideItem::refresh(bool bUpdateIntervals)
{
if (!isstale) return;
@@ -685,7 +685,7 @@ RideItem::refresh()
}
// Update auto intervals AFTER ridefilecache as used for bests
updateIntervals();
if (bUpdateIntervals) updateIntervals();
// update fingerprints etc, crc done above
fingerprint = static_cast<unsigned long>(context->athlete->zones(sport)->getFingerprint(dateTime.date()))

View File

@@ -223,7 +223,7 @@ class RideItem : public QObject
bool hasLinkedActivity() const;
// refresh when stale
void refresh();
void refresh(bool bUpdateIntervals=true);
// get/set
void setRide(RideFile *);