diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 858ef98bcd2..89e22aebed0 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -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);