Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lib/idlelib/idle_test/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def test_init(self):
node = tree.TreeNode(sc.canvas, None, item)
node.expand()

def test_zoom_height(self):
sc = tree.ScrolledCanvas(self.root)
self.assertEqual(sc.zoom_height(None), "break")


if __name__ == '__main__':
unittest.main(verbosity=2)
3 changes: 2 additions & 1 deletion Lib/idlelib/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def __init__(self, master, **opts):
if 'yscrollincrement' not in opts:
opts['yscrollincrement'] = 17
self.master = master
self.top = master.winfo_toplevel()
self.frame = Frame(master)
self.frame.rowconfigure(0, weight=1)
self.frame.columnconfigure(0, weight=1)
Expand Down Expand Up @@ -457,7 +458,7 @@ def unit_down(self, event):
self.canvas.yview_scroll(1, "unit")
return "break"
def zoom_height(self, event):
zoomheight.zoom_height(self.master)
zoomheight.ZoomHeight(self).zoom_height()
return "break"


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix the Alt-2 (zoom height) binding in IDLE's tree windows, such as Path
Browser and Module Browser. It called a function removed from
``idlelib.zoomheight`` in 2019 and raised :exc:`AttributeError`.
Loading