[Bf-blender-cvs] [aa0db0038ed] filebrowser_redesign: Fix empty tool settings region with old files
Julian Eisel
noreply at git.blender.org
Mon Sep 2 16:15:54 CEST 2019
Commit: aa0db0038ed82066db531938d660de730f987117
Author: Julian Eisel
Date: Mon Sep 2 16:14:07 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rBaa0db0038ed82066db531938d660de730f987117
Fix empty tool settings region with old files
E.g. visible in the VSE workspace.
Also removes redundant NULL checks (do_versions_find_region asserts, and
AFAIK they should never be NULL)
===================================================================
M source/blender/blenloader/intern/versioning_280.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 22a1a99ed82..e0396cf1ec1 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3720,13 +3720,21 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
ARegion *ar_ui = do_versions_find_region(regionbase, RGN_TYPE_UI);
ARegion *ar_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER);
+ ARegion *ar_toolprops = do_versions_find_region(regionbase, RGN_TYPE_TOOL_PROPS);
- if (ar_ui && ar_header) {
- /* Reinsert UI region so that it spawns entire area width */
- BLI_remlink(regionbase, ar_ui);
- BLI_insertlinkafter(regionbase, ar_header, ar_ui);
+ /* Reinsert UI region so that it spawns entire area width */
+ BLI_remlink(regionbase, ar_ui);
+ BLI_insertlinkafter(regionbase, ar_header, ar_ui);
- ar_ui->flag |= RGN_FLAG_DYNAMIC_SIZE;
+ ar_ui->flag |= RGN_FLAG_DYNAMIC_SIZE;
+
+ if (ar_toolprops->alignment == (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV)) {
+ SpaceType *stype = BKE_spacetype_from_id(sl->spacetype);
+
+ /* Remove empty region at old location. */
+ BLI_assert(sfile->op == NULL);
+ BKE_area_region_free(stype, ar_toolprops);
+ BLI_freelinkN(regionbase, ar_toolprops);
}
if (sfile->params) {
More information about the Bf-blender-cvs
mailing list