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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user