Fix wrong header alignment in user preferences, after recent commit.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user