Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-12-15 23:27:59 +0300
committerJulian Eisel <julian@blender.org>2020-12-15 23:31:45 +0300
commit7e8f6985d89866197be8465a8aec57f9b4ef7b51 (patch)
tree35431055211a79f5b32b0bf46d19ae30eed6da68 /source/blender
parent1e799dd26ec1e8487d61f7cdfb592dc86881df18 (diff)
Fix crash selecting custom asset preview from maximized File Browser
If Preferences > Interface > Temporary Editors > File Browser is set to "Maximized Area", "Load Custom Preview" in the Asset Browser would crash after selecting the file. 1e799dd26ec1e848 was important to get this issue fixed. This commit just ensures the file-list is recreated correctly after closing the temporary File Browser, so the custom preview operator can execute on valid context.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index ac27862d507..61624ad9d7c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2293,6 +2293,11 @@ static int wm_handler_fileselect_do(bContext *C,
}
wm_handler_op_context(C, handler, ctx_win->eventstate);
+ ScrArea *handler_area = CTX_wm_area(C);
+ /* Make sure new context area is ready, the operator callback may operate on it. */
+ if (handler_area) {
+ ED_area_do_refresh(C, handler_area);
+ }
/* Needed for #UI_popup_menu_reports. */