diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index 7201aa2a323..1091005f171 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -1001,9 +1001,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): @@ -3212,9 +3220,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()