diff --git a/src/octoprint/static/js/app/viewmodels/wizard.js b/src/octoprint/static/js/app/viewmodels/wizard.js index 3a29c32a..c73d504b 100644 --- a/src/octoprint/static/js/app/viewmodels/wizard.js +++ b/src/octoprint/static/js/app/viewmodels/wizard.js @@ -134,6 +134,16 @@ $(function() { dataType: "json", success: callback }); + }; + + self.onSettingsPreventRefresh = function() { + if (self.isDialogActive() && hasDataChanged(self.settingsViewModel.getLocalData(), self.settingsViewModel.lastReceivedSettings)) { + // we have local changes, show update dialog + self.settingsViewModel.settingsUpdatedDialog.modal("show"); + return true; + } + + return false; } }