From ab823176d31dc155645de733f1cd4fbd6ad74592 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Sep 2019 16:00:19 +0200 Subject: Fix saving images from temp Image Editor failing Steps to reproduce were: * Ensure //Render//->//Display Mode// is //New Window// * F12 * In the opened Image Editor, Alt+S to save the image * Save the image The saving would fail silently. Issue was that wm_handler_op_context() would fail to find the correct area to activate, as the wrong window was active in context. So allow overriding this window and do so when creating the file-select handler. --- source/blender/windowmanager/wm_event_system.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/windowmanager/wm_event_system.h') diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h index 53b25a80dce..c53ccda170a 100644 --- a/source/blender/windowmanager/wm_event_system.h +++ b/source/blender/windowmanager/wm_event_system.h @@ -116,6 +116,10 @@ typedef struct wmEventHandler_Op { /** Store context for this handler for derived/modal handlers. */ struct { + /* To override the window, and hence the screen. Set for few cases only, usually window/screen + * can be taken from current context. */ + struct wmWindow *win; + struct ScrArea *area; struct ARegion *region; short region_type; -- cgit v1.2.3