Skip to content

Commit 388be34

Browse files
authored
Merge 7c354fb into 61000de
2 parents 61000de + 7c354fb commit 388be34

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

source/gui/settingsDialogs.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,17 @@ def onApply(self, evt):
274274
self.postInit()
275275
self.SetReturnCode(wx.ID_APPLY)
276276

277-
def _onWindowDestroy(self, evt):
278-
evt.Skip()
279-
self._setInstanceDestroyedState()
277+
def _onWindowDestroy(self, evt: wx.WindowDestroyEvent):
278+
# Destroy events are sent to parent windows for handling.
279+
# If a child window is being destroyed, we don't want to
280+
# set this object as destroyed.
281+
# The ExpandoTextCtrl creates a destroy event as part of
282+
# initialization, this caused the NVDASettings dialog
283+
# to be incorrectly set to destroyed, causing #12818.
284+
isSelfAlive = bool(self)
285+
if not isSelfAlive:
286+
evt.Skip()
287+
self._setInstanceDestroyedState()
280288

281289
# An event and event binder that will notify the containers that they should
282290
# redo the layout in whatever way makes sense for their particular content.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[globalCommands.GlobalCommands]
2+
activateBrailleSettingsDialog = kb:control+/

0 commit comments

Comments
 (0)