Skip to content

Commit 0ab7c74

Browse files
authored
Merge bb60ea3 into 738ead5
2 parents 738ead5 + bb60ea3 commit 0ab7c74

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

source/gui/settingsDialogs.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ def __new__(cls, *args, **kwargs):
145145
if state is cls.DialogState.DESTROYED and not multiInstanceAllowed:
146146
# The dialog has been destroyed by wx, but the instance is still available.
147147
# This indicates there is something keeping it alive.
148-
log.debugWarning(f"Opening new settings dialog while instance still exists: {firstMatchingInstance!r}")
149-
# Handle gracefully
150-
SettingsDialog._instances[firstMatchingInstance] = cls.DialogState.CREATED
151-
return firstMatchingInstance
152-
obj = super(SettingsDialog, cls).__new__(cls, *args, **kwargs)
148+
raise RuntimeError(f"Cannot open new settings dialog while instance still exists: {firstMatchingInstance!r}")
149+
obj = super().__new__(cls, *args, **kwargs)
153150
SettingsDialog._instances[obj] = cls.DialogState.CREATED
154151
return obj
155152

0 commit comments

Comments
 (0)