diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-29 10:32:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-29 10:32:39 +0300 |
commit | 564ffc060b0df3f47ffa57e180c26800c27c26d9 (patch) | |
tree | 80b2a6b36e8e1b4b5faa98ccefa1ecf9371e31f3 /source | |
parent | 94b7e1dcc6fa7d4a66dca0a24cdccf3b404bdf8e (diff) |
Fix T63963: Top-bar not showing for some files
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 1359684e221..ae8bf8010cc 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3236,15 +3236,19 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; /* All spaces that use tools must be eventually added. */ + ARegion *ar = NULL; if (ELEM(sl->spacetype, SPACE_VIEW3D, SPACE_IMAGE) && - (do_versions_find_region_or_null(regionbase, RGN_TYPE_TOOL_HEADER) == NULL)) { + ((ar = do_versions_find_region_or_null(regionbase, RGN_TYPE_TOOL_HEADER)) == NULL)) { /* Add tool header. */ - ARegion *ar = do_versions_add_region(RGN_TYPE_TOOL_HEADER, "tool header"); + ar = do_versions_add_region(RGN_TYPE_TOOL_HEADER, "tool header"); ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP; ARegion *ar_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER); BLI_insertlinkbefore(regionbase, ar_header, ar); } + if (ar != NULL) { + SET_FLAG_FROM_TEST(ar->flag, ar->flag & RGN_FLAG_HIDDEN_BY_USER, RGN_FLAG_HIDDEN); + } } } } |