1
0
Fork 0

Auto-select built-in FGdata when possible.

As spotted by Thorsten, reduce user annoyance by asking about FGData
when the built-in data is acceptable. (Advanced users can use the
launcher or other options to change FGdata as normal).
This commit is contained in:
James Turner 2017-05-30 10:02:30 +01:00
parent d2a6eb69a5
commit 7951abefe2

View file

@ -109,8 +109,15 @@ SGPath SetupRootDialog::restoreUserSelectedRoot()
if (validatePath(path) && validateVersion(path)) {
return SGPath::fromUtf8(path.toStdString());
} else {
// we have an existing path but it's invalid. Let's ask the
// user what they want
// we have an existing path but it's invalid.
// let's see if the default root is acceptable, in which case we will
// switch to it. (This gives a more friendly upgrade experience).
if (defaultRootAcceptable()) {
return std::string(); // use the default path
}
// okay, we don't have an acceptable FG_DATA anywhere we can find, we
// have to ask the user what they want to do.
bool ok = runDialog(VersionCheckFailed);
Q_ASSERT(ok);
// run dialog either exit()s or sets fg_root, so this