Blender Git Commit Log

Git Commits -> Revision 7583615

Revision 7583615 by Julian Eisel (master)
January 15, 2020, 14:05 (GMT)
Fix invalid region rectangles, sanitize dynamic region size calulations

It was too easy to end up with invalid region rectangles and we were
badly protected against them, so that they were hard to catch.
In fact we still create a main region for the top-bar, which ended up
getting a region height of -1. While this doesn't seem to have caused
issues in practice, we should prevent them entirely.

So idea was that at the end of region layout resolving,
`BLI_rcti_is_valid()` should return `true` for the region rectangle.
Further changes here ensure this is true: The `RGN_FLAG_TOO_SMALL` flag
is now set whenever there is not enough space for a region or if it
would get a size of zero or less.

Note: Should the assert fail, please do not just disable it and try to
actually address the root of the issue.

Commit Details:

Full Hash: 758361556b5b9afff506e4247345b739c0f8170c
Parent Commit: 0e94d8b
Lines Changed: +29, -3

2 Modified Paths:

/source/blender/editors/screen/area.c (+21, -2) (Diff)
/source/blender/windowmanager/intern/wm_draw.c (+8, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021