Page MenuHome
Paste P1059

(An Untitled Masterwork)
ActivePublic

Authored by Brecht Van Lommel (brecht) on Jul 31 2019, 12:29 PM.
Tags
None
Subscribers
None
Tokens
"Love" token, awarded by billreynish.
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index cb2b649..545908c 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3535,5 +3535,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
/* Versioning code until next subversion bump goes here. */
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_TEXT) {
+ ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+ ARegion *ar = do_versions_find_region(regionbase, RGN_TYPE_UI);
+ if (ar) {
+ ar->alignment = RGN_ALIGN_RIGHT;
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 24f282f..9a7debe 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -82,7 +82,7 @@ static SpaceLink *text_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
BLI_addtail(&stext->regionbase, ar);
ar->regiontype = RGN_TYPE_UI;
- ar->alignment = RGN_ALIGN_LEFT;
+ ar->alignment = RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main region */