Fix wrong header alignment in user preferences, after recent commit.

This commit is contained in:
Brecht Van Lommel
2018-05-06 21:23:53 +02:00
parent b3e8bd98e8
commit 77c2acdfae

View File

@@ -1855,6 +1855,15 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type, const bool skip_ar_exi
/* put in front of list */
BLI_remlink(&sa->spacedata, sl);
BLI_addhead(&sa->spacedata, sl);
/* Sync header alignment. */
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_HEADER) {
ar->alignment = header_alignment;
break;
}
}
}
else {
/* new space */
@@ -1871,14 +1880,6 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type, const bool skip_ar_exi
BLI_listbase_clear(&sl->regionbase);
}
}
/* Sync header alignment. */
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_HEADER) {
ar->alignment = header_alignment;
break;
}
}
ED_area_initialize(CTX_wm_manager(C), win, sa);