diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 257f43f4b9f..ff088d83358 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3879,11 +3879,20 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } else if (sl->spacetype == SPACE_FILE) { ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ARegion *ar_tools = do_versions_find_region_or_null(regionbase, RGN_TYPE_TOOLS); - if (!do_versions_find_region_or_null(regionbase, RGN_TYPE_TOOLS)) { + if (ar_tools) { + ARegion *ar_next = ar_tools->next; + + /* We temporarily had two tools regions, get rid of the second one. */ + if (ar_next && ar_next->regiontype == RGN_TYPE_TOOLS) { + do_versions_remove_region(regionbase, RGN_TYPE_TOOLS); + } + } + else { ARegion *ar_ui = do_versions_find_region(regionbase, RGN_TYPE_UI); - ARegion *ar_tools = do_versions_add_region(RGN_TYPE_TOOLS, - "versioning file tools region"); + + ar_tools = do_versions_add_region(RGN_TYPE_TOOLS, "versioning file tools region"); BLI_insertlinkafter(regionbase, ar_ui, ar_tools); ar_tools->alignment = RGN_ALIGN_LEFT; } |