[Bf-blender-cvs] [048135e2c82] master: Fix T85448: File Browser sidebar collapses when selecting a file

Julian Eisel noreply at git.blender.org
Mon Feb 8 16:14:23 CET 2021


Commit: 048135e2c826b46ecf77324b93246ad70171e91d
Author: Julian Eisel
Date:   Mon Feb 8 16:09:35 2021 +0100
Branches: master
https://developer.blender.org/rB048135e2c826b46ecf77324b93246ad70171e91d

Fix T85448: File Browser sidebar collapses when selecting a file

The logic to ensure a valid region state was too aggressive in setting the
region hiding. It would just always update it based on the operator's
`hide_props_region` option, not only when file browser was newly opened.
It's more selective now.

===================================================================

M	source/blender/editors/space_file/space_file.c

===================================================================

diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index d4cd888c662..178ca264182 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -261,7 +261,7 @@ static void file_ensure_valid_region_state(bContext *C,
     }
   }
   /* If there's an file-operation, ensure we have the option and execute region */
-  else if (sfile->op) {
+  else if (sfile->op && !BKE_area_find_region_type(area, RGN_TYPE_TOOL_PROPS)) {
     ARegion *region_ui = file_ui_region_ensure(area, region_tools);
     ARegion *region_execute = file_execute_region_ensure(area, region_ui);
     ARegion *region_props = file_tool_props_region_ensure(area, region_execute);
@@ -276,7 +276,7 @@ static void file_ensure_valid_region_state(bContext *C,
     needs_init = true;
   }
   /* If there's _no_ file-operation, ensure we _don't_ have the option and execute region */
-  else {
+  else if (!sfile->op) {
     ARegion *region_props = BKE_area_find_region_type(area, RGN_TYPE_TOOL_PROPS);
     ARegion *region_execute = BKE_area_find_region_type(area, RGN_TYPE_EXECUTE);
     ARegion *region_ui = file_ui_region_ensure(area, region_tools);



More information about the Bf-blender-cvs mailing list