bpo-23544: IDLE hangs when selecting Stack Viewer with debug active
"Stack Viewer" is now disabled when user code is running.
This commit is contained in:
parent
3f8cebd32c
commit
152d306158
|
@ -449,7 +449,9 @@ class EditorWindow(object):
|
|||
self.menudict = menudict = {}
|
||||
for name, label in self.menu_specs:
|
||||
underline, label = prepstr(label)
|
||||
menudict[name] = menu = Menu(mbar, name=name, tearoff=0)
|
||||
postcommand = getattr(self, f'{name}_menu_postcommand', None)
|
||||
menudict[name] = menu = Menu(mbar, name=name, tearoff=0,
|
||||
postcommand=postcommand)
|
||||
mbar.add_cascade(label=label, menu=menu, underline=underline)
|
||||
if macosx.isCarbonTk():
|
||||
# Insert the application menu
|
||||
|
|
|
@ -990,6 +990,10 @@ class PyShell(OutputWindow):
|
|||
self.showprompt()
|
||||
self.set_debugger_indicator()
|
||||
|
||||
def debug_menu_postcommand(self):
|
||||
state = 'disabled' if self.executing else 'normal'
|
||||
self.update_menu_state('debug', '*Stack Viewer', state)
|
||||
|
||||
def beginexecuting(self):
|
||||
"Helper for ModifiedInterpreter"
|
||||
self.resetoutput()
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
The "Stack Viewer" item in the "Debug" menu can no longer be selected when
|
||||
user code is running.
|
Loading…
Reference in New Issue