Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
==========================================
+ Coverage 86.54% 86.70% +0.15%
==========================================
Files 46 46
Lines 5196 5198 +2
==========================================
+ Hits 4497 4507 +10
+ Misses 699 691 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Because we aren't redrawing the canvas on resize, of course 😆 If you check out the pygfx camera controller, a redraw is only triggered on some actions. One of which is clicking on the canvas. Resizes events don't even call that function, or at least my breakpoint isn't hit when I resize... I think that before, we were redrawing all of the time, with something like: def _animate(self) -> None:
if self._camera is not None:
self._renderer.render(self._scene, self._camera)
# Draw again, recursively!
self._canvas.request_draw(self._animate)but we took it out to avoid unnecessary draws. I think a better solution is just to redraw in some event handler that captures resizes. cc @almarklein |
|
Rendercanvas should schedule a draw whenever the canvas resizes. |
|
Do you mean to say "it's a bug if it doesn't"? |
Yes, should as if it does not, it's a bug. |
|
Oh, but I can indeed reproduce that this does not happen with qt. Looking into it. |
|
Fixed in pygfx/rendercanvas#188, and released rendercanvas v2.6.2 |
|
Thanks as always! |
@gselzer
there's one thing that's changed about pygfx/rendercanvas since the last version here and that is that i can't get it to render immediately at the right aspect ratio. any action, even just clicking the canvas, makes it snap into correct ratio. know why?
Screen.Recording.2026-03-05.at.8.23.31.PM.mov