From 73fb445b8dbe88b1ac8e12acd2515618f9e64ac0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Aug 2020 11:32:45 +1000 Subject: Fix T78426: Header flips when changing editors The existing header flip detection didn't account for mixed tool-header and header flipping & visibility between space-types. Now alignment syncing handles any combination of header, tool-header & footer flipped state, in a way that can be extended to other region types in the future. --- source/blender/makesdna/DNA_screen_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna/DNA_screen_types.h') diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index d5b828c898d..60d6f85569c 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -635,7 +635,10 @@ typedef enum eRegionType { RGN_TYPE_EXECUTE = 10, RGN_TYPE_FOOTER = 11, RGN_TYPE_TOOL_HEADER = 12, + +#define RGN_TYPE_LEN (RGN_TYPE_TOOL_HEADER + 1) } eRegionType; + /* use for function args */ #define RGN_TYPE_ANY -1 @@ -661,6 +664,7 @@ enum { /** Mask out flags so we can check the alignment. */ #define RGN_ALIGN_ENUM_FROM_MASK(align) ((align) & ((1 << 4) - 1)) +#define RGN_ALIGN_FLAG_FROM_MASK(align) ((align) & ~((1 << 4) - 1)) /** #ARegion.flag */ enum { -- cgit v1.2.3