| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Nice test! (I would have went with an image test, but this is clearly better!)
Sorry, something went wrong.
…317-on-v3.10.x Backport PR #29317 on branch v3.10.x (FIX: pass renderer through `_auto_legend_data`)
| Back | FazBrowse Home | New Git URL |
PR summary
Fixes #29301.
The problem was that FigureCanvasPS._print_figure essentially got into a loop of calling itself: somewhere within figure.draw we needed to call figure._get_renderer in order to calculate the annotation window extent and therefore the legend position. _get_renderer ultimately calls FigureCanvasPS._print_figure again. I haven't quite followed why, but by the time we get to the end of FigureCanvasPS._print_figure, _ps_writer which should contain all the information about the artists is empty.
We can avoid all this by just passing the renderer we already have hold of to get_window_extent.
PR checklist