Fix issue with hidden headers after previous commit.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 6 May 2018 14:07:34 +0000 (16:07 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 6 May 2018 14:08:12 +0000 (16:08 +0200)
source/blender/editors/screen/area.c

index f8482eba67e8d81b35f49526a843237a2c9052a4..611e5fdd6365b7c06283dc0b019a165a2dd9b6fd 100644 (file)
@@ -1114,6 +1114,10 @@ static void region_overlap_fix(ScrArea *sa, ARegion *ar)
 
        /* find overlapping previous region on same place */
        for (ar1 = ar->prev; ar1; ar1 = ar1->prev) {
 
        /* find overlapping previous region on same place */
        for (ar1 = ar->prev; ar1; ar1 = ar1->prev) {
+               if (ar1->flag & (RGN_FLAG_HIDDEN)) {
+                       continue;
+               }
+
                if (ar1->overlap && ((ar1->alignment & RGN_SPLIT_PREV) == 0)) {
                        align1 = ar1->alignment;
                        if (BLI_rcti_isect(&ar1->winrct, &ar->winrct, NULL)) {
                if (ar1->overlap && ((ar1->alignment & RGN_SPLIT_PREV) == 0)) {
                        align1 = ar1->alignment;
                        if (BLI_rcti_isect(&ar1->winrct, &ar->winrct, NULL)) {
@@ -1153,6 +1157,10 @@ static void region_overlap_fix(ScrArea *sa, ARegion *ar)
        /* At this point, 'ar' is in its final position and still open.
         * Make a final check it does not overlap any previous 'other side' region. */
        for (ar1 = ar->prev; ar1; ar1 = ar1->prev) {
        /* At this point, 'ar' is in its final position and still open.
         * Make a final check it does not overlap any previous 'other side' region. */
        for (ar1 = ar->prev; ar1; ar1 = ar1->prev) {
+               if (ar1->flag & (RGN_FLAG_HIDDEN)) {
+                       continue;
+               }
+
                if (ar1->overlap && (ar1->alignment & RGN_SPLIT_PREV) == 0) {
                        if ((ar1->alignment != align) && BLI_rcti_isect(&ar1->winrct, &ar->winrct, NULL)) {
                                /* Left overlapping right or vice-versa, forbid this! */
                if (ar1->overlap && (ar1->alignment & RGN_SPLIT_PREV) == 0) {
                        if ((ar1->alignment != align) && BLI_rcti_isect(&ar1->winrct, &ar->winrct, NULL)) {
                                /* Left overlapping right or vice-versa, forbid this! */