2.5
authorTon Roosendaal <ton@blender.org>
Fri, 26 Jun 2009 12:55:46 +0000 (12:55 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 26 Jun 2009 12:55:46 +0000 (12:55 +0000)
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

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;
        }
 }