Merge pull request #176 from mikeller/fix_backup_profile_switching

Fixed backup / restore with profile switching.
10.3.x-maintenance v1.7.0
Michael Keller 2016-08-03 10:02:49 +12:00 committed by GitHub
commit da1f4a3b60
2 changed files with 16 additions and 2 deletions

View File

@ -890,3 +890,9 @@ TABS.pid_tuning.checkUpdateProfile = function (updateRateProfile) {
}
}
TABS.pid_tuning.setUpdating = function (isUpdating) {
var self = this;
self.updating = isUpdating;
}

View File

@ -140,7 +140,11 @@ TABS.setup.initialize = function (callback) {
if ($(this).hasClass('disabled')) {
return;
}
TABS.pid_tuning.setUpdating(true);
configuration_backup(function () {
TABS.pid_tuning.setUpdating(false);
GUI.log(chrome.i18n.getMessage('initialSetupBackupSuccess'));
});
});
@ -149,11 +153,15 @@ TABS.setup.initialize = function (callback) {
if ($(this).hasClass('disabled')) {
return;
}
configuration_restore(function () {
GUI.log(chrome.i18n.getMessage('initialSetupRestoreSuccess'));
TABS.pid_tuning.setUpdating(true);
configuration_restore(function () {
// get latest settings
TABS.setup.initialize();
TABS.pid_tuning.setUpdating(false);
GUI.log(chrome.i18n.getMessage('initialSetupRestoreSuccess'));
});
});