diff options
-rw-r--r-- | source/blender/editors/screen/area.c | 16 |
1 files 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; } } |