Bug fix #34347
authorTon Roosendaal <ton@blender.org>
Sat, 23 Feb 2013 14:31:46 +0000 (14:31 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 23 Feb 2013 14:31:46 +0000 (14:31 +0000)
If you move (with F5) the properties and tools region in 3d viewport to the same side,
the mini-axis and text overlays were drawing in wrong place.

source/blender/editors/screen/area.c

index 023a1bbbb1c97958e2551bd12b1289d91914fa27..46f726e45c623a98b7cc240576d99d3ab154c7b7 100644 (file)
@@ -1965,11 +1965,13 @@ void ED_region_visible_rect(ARegion *ar, rcti *rect)
        for (; arn; arn = arn->next) {
                if (ar != arn && arn->overlap) {
                        if (BLI_rcti_isect(rect, &arn->winrct, NULL)) {
-                               /* overlap left */
-                               if (rect->xmin == arn->winrct.xmin)
+                               
+                               /* overlap left, also check 1 pixel offset (2 regions on one side) */
+                               if ( ABS(rect->xmin - arn->winrct.xmin) < 2)
                                        rect->xmin = arn->winrct.xmax;
+
                                /* overlap right */
-                               if (rect->xmax == arn->winrct.xmax)
+                               if ( ABS(rect->xmax - arn->winrct.xmax) < 2)
                                        rect->xmax = arn->winrct.xmin;
                        }
                }