Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2020-01-16 17:55:49 +0300
committerJulian Eisel <eiseljulian@gmail.com>2020-01-16 18:13:15 +0300
commitd52551401e185a3e1092fb07edebd07d552e04e2 (patch)
tree0b109024b0acaedc9707f2d8034e8da82bf0d146 /source/blender/editors/space_statusbar
parent5b8c2301d8b7400013903fe0b02071ba19aafb9f (diff)
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.
Diffstat (limited to 'source/blender/editors/space_statusbar')
-rw-r--r--source/blender/editors/space_statusbar/space_statusbar.c2
1 files changed, 1 insertions, 1 deletions
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);