From 404e3168cc888975d856b44ff5cf12523f6a9c21 Mon Sep 17 00:00:00 2001 From: Cyrille Bougot Date: Mon, 4 Sep 2023 01:06:52 +0200 Subject: [PATCH] Fix WASAPI option enabling/disabling when restoring advanced options (#15355) Summary of the issue: The following advanced options are greyed out or not depending if they are applicable: "Volume of NVDA sounds" and "Volume of NVDA sounds follows voice volume". If they are applicable or not depends on other options: "Use WASAPI for audio output" and "Volume of NVDA sounds" respectively. Unfortunately, when pressing the "Restore defaults" button of the advanced panel, the options are reset to there default values, but they are not greyed out / ungreyed accordingly. Description of user facing changes When pressing the restore default button in advanced panel, WASAPI advanced options will now be greyed out or not according to if they are applicable or not. Description of development approach Just call the update function self._onWASAPIChange() when restoring the values. --- source/gui/settingsDialogs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index 3d3e3e1c9f5..3bc04a241d0 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -3233,6 +3233,7 @@ def restoreToDefaults(self): self.wasapiComboBox.resetToConfigSpecDefault() self.soundVolFollowCheckBox.SetValue(self.soundVolFollowCheckBox.defaultValue) self.soundVolSlider.SetValue(self.soundVolSlider.defaultValue) + self._onWASAPIChange() self.logCategoriesList.CheckedItems = self.logCategoriesList.defaultCheckedItems self.playErrorSoundCombo.SetSelection(self.playErrorSoundCombo.defaultValue) self._defaultsRestored = True