mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Default Weight Refresh
.. if the default athlete weight is changed then all ride metrics need to be recalculated to reflect the new default .. any cached values need to be invalidated so interval metrics reflect the new weight (if needed) It would be better for users to maintain weight either against the ride in the "Weight" field, or via Withings !
This commit is contained in:
@@ -1887,36 +1887,6 @@ Context::notifyConfigChanged()
|
||||
configChanged();
|
||||
}
|
||||
|
||||
void
|
||||
Athlete::configChanged()
|
||||
{
|
||||
// re-read Zones in case it changed
|
||||
QFile zonesFile(home.absolutePath() + "/power.zones");
|
||||
if (zonesFile.exists()) {
|
||||
if (!zones_->read(zonesFile)) {
|
||||
QMessageBox::critical(context->mainWindow, tr("Zones File Error"),
|
||||
zones_->errorString());
|
||||
}
|
||||
else if (! zones_->warningString().isEmpty())
|
||||
QMessageBox::warning(context->mainWindow, tr("Reading Zones File"), zones_->warningString());
|
||||
}
|
||||
|
||||
// reread HR zones
|
||||
QFile hrzonesFile(home.absolutePath() + "/hr.zones");
|
||||
if (hrzonesFile.exists()) {
|
||||
if (!hrzones_->read(hrzonesFile)) {
|
||||
QMessageBox::critical(context->mainWindow, tr("HR Zones File Error"),
|
||||
hrzones_->errorString());
|
||||
}
|
||||
else if (! hrzones_->warningString().isEmpty())
|
||||
QMessageBox::warning(context->mainWindow, tr("Reading HR Zones File"), hrzones_->warningString());
|
||||
}
|
||||
|
||||
QVariant unit = appsettings->cvalue(cyclist, GC_UNIT);
|
||||
useMetricUnits = (unit.toString() == GC_UNIT_METRIC);
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* Measures
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user