diff options
author | Julian Eisel <julian@blender.org> | 2020-12-15 23:27:59 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-15 23:31:45 +0300 |
commit | 7e8f6985d89866197be8465a8aec57f9b4ef7b51 (patch) | |
tree | 35431055211a79f5b32b0bf46d19ae30eed6da68 /source/blender/windowmanager | |
parent | 1e799dd26ec1e8487d61f7cdfb592dc86881df18 (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/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 5 |
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. */ |