From 07e9c4ef2b221a245497d75336fd5ece12d98682 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 26 Jun 2009 12:55:46 +0000 Subject: 2.5 Makes toolbar region in 3d editor work correctly overlapping, also when area is subdivided in 4-split, and/or with properties region. --- source/blender/editors/screen/area.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 07d8fb370e6..535e99ccfef 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -259,14 +259,16 @@ static void region_scissor_winrct(ARegion *ar, rcti *winrct) while(ar->prev) { ar= ar->prev; - if(ar->flag & RGN_FLAG_HIDDEN); - else if(ar->alignment==RGN_OVERLAP_LEFT) { - winrct->xmin= ar->winrct.xmax + 1; - } - else if(ar->alignment==RGN_OVERLAP_RIGHT) { - winrct->xmax= ar->winrct.xmin - 1; + if(BLI_isect_rcti(winrct, &ar->winrct, NULL)) { + if(ar->flag & RGN_FLAG_HIDDEN); + else if(ar->alignment==RGN_OVERLAP_LEFT) { + winrct->xmin= ar->winrct.xmax + 1; + } + else if(ar->alignment==RGN_OVERLAP_RIGHT) { + winrct->xmax= ar->winrct.xmin - 1; + } + else break; } - else break; } } -- cgit v1.2.3