Fix #36059: region overlap did not show scopes overlapping in the image editor.

It's only enabled for some particular regions, this one makes sense to show.
This commit is contained in:
Brecht Van Lommel 2013-07-08 18:27:32 +00:00
parent 3ce280e825
commit 63042da52a

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