Skip to content

Commit

Permalink
Work around wxWidgets assertion
Browse files Browse the repository at this point in the history
See #12220
  • Loading branch information
feerrenrut committed Apr 14, 2021
1 parent 0efeee4 commit a21409d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()


Expand Down

0 comments on commit a21409d

Please sign in to comment.