From e6d12761e22f07a07e29352d03995ba6023a456d Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Wed, 3 Aug 2016 09:38:01 +1200 Subject: [PATCH] Fixed backup / restore with profile switching. --- tabs/pid_tuning.js | 6 ++++++ tabs/setup.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 6f05afb2..7d85e81a 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -890,3 +890,9 @@ TABS.pid_tuning.checkUpdateProfile = function (updateRateProfile) { } } + +TABS.pid_tuning.setUpdating = function (isUpdating) { + var self = this; + + self.updating = isUpdating; +} diff --git a/tabs/setup.js b/tabs/setup.js index eaa0e086..ae64f7d8 100755 --- a/tabs/setup.js +++ b/tabs/setup.js @@ -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')); }); });