depth incremented wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SquareMap |
Fix Released
|
Medium
|
Mike C. Fletcher |
Bug Description
When I try to use the squaremap code and use the shallower and deeper features such as in runsnake, I found that shallower was not working correctly. What is happening is that depth is incremented essentially twice as often as it should be. This makes max_depth_seen double. I have found that the problem is in LayoutChildren where DrawBox is called. depth is being incremented on the call to DrawBox when it has already been incremented on the call to LayoutChildren.
if head_coord:
)
should be:
if head_coord:
)
When I make that simple change, max_depth_seen is correct and shallower works fine.
Thanks for letting me know. Fix is released on PyPI.