Fix division by zero when split regions are hidden
Code has special handling so that only the first of two split regions needs to be flagged as hidden. If the second one is also flagged that can have some unwanted side-effects. Code to add the region resizing edges relied on the region visibility flags though, rather than the visibility check that respects this handling of split region hiding. So code would run that is only intended for un-hidden regions.
This commit is contained in:
@@ -782,7 +782,7 @@ static bool azone_clipped_rect_calc(const AZone *az, rcti *r_rect_clip)
|
||||
if (az->type == AZONE_REGION) {
|
||||
if (region->overlap && (region->v2d.keeptot != V2D_KEEPTOT_STRICT) &&
|
||||
/* Only when this isn't hidden (where it's displayed as an button that expands). */
|
||||
((az->region->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) == 0))
|
||||
region->visible)
|
||||
{
|
||||
/* A floating region to be resized, clip by the visible region. */
|
||||
switch (az->edge) {
|
||||
|
||||
Reference in New Issue
Block a user