mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Athlete Library setting - Avoid warning when there is no change
Current GC root can be different from athlete library setting due to GC startup logic and the spurious warning is confusing. Revert to previous value, not current GC root, if the user chooses to. Fixes #3903
This commit is contained in:
@@ -146,7 +146,7 @@ ConfigDialog::ConfigDialog(QDir _home, Context *context) :
|
||||
|
||||
measures = new MeasuresConfig(_home, context);
|
||||
HelpWhatsThis *measuresHelp = new HelpWhatsThis(measures);
|
||||
measures->setWhatsThis(intervalHelp->getWhatsThisText(HelpWhatsThis::Preferences_Measures));
|
||||
measures->setWhatsThis(measuresHelp->getWhatsThisText(HelpWhatsThis::Preferences_Measures));
|
||||
pagesWidget->addWidget(measures);
|
||||
|
||||
train = new TrainConfig(_home, context);
|
||||
@@ -228,7 +228,7 @@ void ConfigDialog::saveClicked()
|
||||
|
||||
// did the home directory change?
|
||||
QString shome = appsettings->value(this, GC_HOMEDIR).toString();
|
||||
if (shome != general->generalPage->athleteWAS || QFileInfo(shome).absoluteFilePath() != QFileInfo(home.absolutePath()).absolutePath()) {
|
||||
if (shome != general->generalPage->athleteWAS) {
|
||||
|
||||
// are you sure you want to change the location of the athlete library?
|
||||
// if so we will restart, if not I'll revert to current directory
|
||||
@@ -263,8 +263,8 @@ void ConfigDialog::saveClicked()
|
||||
|
||||
} else {
|
||||
|
||||
// revert to current home and let everyone know
|
||||
appsettings->setValue(GC_HOMEDIR, QFileInfo(home.absolutePath()).absolutePath());
|
||||
// revert to previous home
|
||||
appsettings->setValue(GC_HOMEDIR, general->generalPage->athleteWAS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user