Fix #36059: region overlap did not show scopes overlapping in the image editor.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 8 Jul 2013 18:27:32 +0000 (18:27 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 8 Jul 2013 18:27:32 +0000 (18:27 +0000)
It's only enabled for some particular regions, this one makes sense to show.

source/blender/editors/screen/area.c

index 4ddacc3254ef2eb9ae139a31a714fc958080c300..6c0d5ccd844c4eb499760a9d628d0e09b3b4eb38 100644 (file)
@@ -908,11 +908,19 @@ static void region_overlap_fix(ScrArea *sa, ARegion *ar)
 /* overlapping regions only in the following restricted cases */
 static int region_is_overlap(wmWindow *win, ScrArea *sa, ARegion *ar)
 {
-       if (U.uiflag2 & USER_REGION_OVERLAP)
-               if (WM_is_draw_triple(win))
-                       if (ELEM4(sa->spacetype, SPACE_VIEW3D, SPACE_IMAGE, SPACE_SEQ, SPACE_CLIP))
+       if (U.uiflag2 & USER_REGION_OVERLAP) {
+               if (WM_is_draw_triple(win)) {
+                       if (ELEM(sa->spacetype, SPACE_VIEW3D, SPACE_SEQ)) {
                                if (ELEM3(ar->regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_TOOL_PROPS))
                                        return 1;
+                       }
+                       else if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
+                               if (ELEM4(ar->regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_TOOL_PROPS, RGN_TYPE_PREVIEW))
+                                       return 1;
+                       }
+               }
+       }
+
        return 0;
 }