diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index 37c306f0ce7..5f89eba8d7c 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -983,9 +983,17 @@ def onPanelDeactivated(self): super(SpeechSettingsPanel,self).onPanelDeactivated() def onDiscard(self): + # Work around wxAssertion error #12220 + # Manually destroying the ExpandoTextCtrl when the settings dialog is + # exited prevents the wxAssertion. + self.synthNameCtrl.Destroy() self.voicePanel.onDiscard() def onSave(self): + # Work around wxAssertion error #12220 + # Manually destroying the ExpandoTextCtrl when the settings dialog is + # exited prevents the wxAssertion. + self.synthNameCtrl.Destroy() self.voicePanel.onSave() class SynthesizerSelectionDialog(SettingsDialog): @@ -3194,9 +3202,17 @@ def onPanelDeactivated(self): super(BrailleSettingsPanel,self).onPanelDeactivated() def onDiscard(self): + # Work around wxAssertion error #12220 + # Manually destroying the ExpandoTextCtrl when the settings dialog is + # exited prevents the wxAssertion. + self.displayNameCtrl.Destroy() self.brailleSubPanel.onDiscard() def onSave(self): + # Work around wxAssertion error #12220 + # Manually destroying the ExpandoTextCtrl when the settings dialog is + # exited prevents the wxAssertion. + self.displayNameCtrl.Destroy() self.brailleSubPanel.onSave()