From d52551401e185a3e1092fb07edebd07d552e04e2 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 16 Jan 2020 15:55:49 +0100 Subject: Fix wrong usages of region align enumerations `ARegion.alignment` unfortunately is a mixture of value and bitflag enumerations. When checking for left/right/top/bottom region alignment, the flags have to be masked out usually. Most of the fixed cases here probably didn't cause issues in practice, but could in fact break at any point when surrounding logic changes. In fact the assert in #region_visible_rect_calc() failed in an older file from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949035. This fixes it. --- source/blender/editors/space_statusbar/space_statusbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_statusbar/space_statusbar.c') diff --git a/source/blender/editors/space_statusbar/space_statusbar.c b/source/blender/editors/space_statusbar/space_statusbar.c index 63f27b4d74a..69060daa171 100644 --- a/source/blender/editors/space_statusbar/space_statusbar.c +++ b/source/blender/editors/space_statusbar/space_statusbar.c @@ -81,7 +81,7 @@ static SpaceLink *statusbar_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void statusbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region) { - if (ELEM(region->alignment, RGN_ALIGN_RIGHT)) { + if (ELEM(RGN_ALIGN_ENUM_FROM_MASK(region->alignment), RGN_ALIGN_RIGHT)) { region->flag |= RGN_FLAG_DYNAMIC_SIZE; } ED_region_header_init(region); -- cgit v1.2.3