diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-27 22:26:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-27 22:31:13 +0300 |
commit | bd957435ac0573d2e1fcbd19edd814476d2ed900 (patch) | |
tree | ebdb27285297be5767de51b8542c5ea679f7676f /source | |
parent | 0ed4cadf5ad065a624c6e93d00631cec54315302 (diff) |
Cleanup: tweak ED_region_is_overlap checks
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/screen/area.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index f8537f35759..d2bc4079e08 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1104,24 +1104,28 @@ static void region_overlap_fix(ScrArea *sa, ARegion *ar) bool ED_region_is_overlap(int spacetype, int regiontype) { if (regiontype == RGN_TYPE_HUD) { - return 1; + return true; } if (U.uiflag2 & USER_REGION_OVERLAP) { - if (spacetype == SPACE_NODE && regiontype == RGN_TYPE_TOOLS) { - return 1; + if (spacetype == SPACE_NODE) { + if (regiontype == RGN_TYPE_TOOLS) { + return true; + } } - if (ELEM(spacetype, SPACE_VIEW3D, SPACE_SEQ, SPACE_IMAGE)) { - if (ELEM(regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_TOOL_PROPS)) - return 1; + else if (ELEM(spacetype, SPACE_VIEW3D, SPACE_SEQ, SPACE_IMAGE)) { + if (ELEM(regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_TOOL_PROPS)) { + return true; + } if (ELEM(spacetype, SPACE_VIEW3D, SPACE_IMAGE)) { - if (regiontype == RGN_TYPE_HEADER) - return 1; + if (regiontype == RGN_TYPE_HEADER) { + return true; + } } } } - return 0; + return false; } static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, rcti *overlap_remainder, int quad) |