diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-18 02:42:00 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-18 04:24:32 +0300 |
commit | e3d90abac7ecad6285b31282524bcde4b0dd12dc (patch) | |
tree | 2263fe624b74b2710519ea3a17021a43cf59ab26 /source/blender/blenloader | |
parent | e69fb440270263e84fa55dfb7cbe24f54069751c (diff) |
Fix: Outliner gsoc versioning
Move outliner versioning for syncing and themes to the block
for the next subversion bump. It was not moved from the first
location it was placed in the soc-2019-outliner branch.
Old files will now load with synced selection enabled reliably.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 19 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 5 |
2 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 1d993185ac7..149b02e7761 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3644,19 +3644,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { arm->flag &= ~(ARM_FLAG_UNUSED_6); } - - /* Marks each outliner as dirty so a sync will occur as an outliner draws. */ - for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (SpaceLink *space = sa->spacedata.first; space; space = space->next) { - if (space->spacetype == SPACE_OUTLINER) { - SpaceOutliner *soutliner = (SpaceOutliner *)space; - soutliner->sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL; - soutliner->flag |= SO_SYNC_SELECT; - } - } - } - } } if (!MAIN_VERSION_ATLEAST(bmain, 281, 1)) { @@ -3691,6 +3678,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) ar->alignment = RGN_ALIGN_RIGHT; } } + /* Mark outliners as dirty for syncing and enable synced selection */ + if (sl->spacetype == SPACE_OUTLINER) { + SpaceOutliner *soutliner = (SpaceOutliner *)sl; + soutliner->sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL; + soutliner->flag |= SO_SYNC_SELECT; + } } } } diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index b01d2765963..1284f2dcddc 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -141,13 +141,12 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) FROM_DEFAULT_V4_UCHAR(space_outliner.row_alternate); } - FROM_DEFAULT_V4_UCHAR(space_outliner.selected_highlight); - FROM_DEFAULT_V4_UCHAR(space_outliner.active); - /** * Include next version bump. */ { + FROM_DEFAULT_V4_UCHAR(space_outliner.selected_highlight); + FROM_DEFAULT_V4_UCHAR(space_outliner.active); } #undef FROM_DEFAULT_V4_UCHAR |