svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / blender / editors / screen / area.c
index 07d8fb370e6ebe798f092e1b42f8adda4562645a..535e99ccfef30dd8f6fcc7df155797f9d5fad602 100644 (file)
@@ -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;
        }
 }