diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-09-20 16:35:28 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-09-20 16:35:28 +0300 |
commit | b20182e334180d751acff4565d2cf061dcb90add (patch) | |
tree | de1e3124d21cc98fce6b46773aff8d2e5c8249b9 /source/blender/editors/space_file/file_ops.c | |
parent | d1cc340e56691cb82e444289415ede24ba4d2bc0 (diff) |
Refactor: Ensure there's always a valid file editor tool region
So far the file browser code had some lazy creation for the tool region,
even though it should always be there. The only reason I can see for
this is compatiblity. So I simply added versioning code to add the
region in case it's not there. Now we should be able to savely assume
the tool region to be there, whithout any unusual lazy-creation.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index fb8c8c5295d..0224192d559 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -2318,7 +2318,7 @@ void FILE_OT_hidedot(struct wmOperatorType *ot) static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused)) { ScrArea *sa = CTX_wm_area(C); - ARegion *ar = file_tools_region_ensure(sa, BKE_area_find_region_type(sa, RGN_TYPE_UI)); + ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS); if (ar) { ED_region_toggle_hidden(C, ar); |