Commit: 7a9cfd08a8d7415ff004809cf62570be9152273e Author: Harley Acheson Date: Thu Sep 16 13:13:15 2021 -0700 Branches: master https://developer.blender.org/rB7a9cfd08a8d7415ff004809cf62570be9152273e
UI: Remove Menus & Show Wait Cursor When Saving When saving blend files close any menus that might be open, show "waiting" mouse cursor right away, before creating preview. See D12507 for more details. Differential Revision: https://developer.blender.org/D12507 Reviewed by Campbell Barton =================================================================== M source/blender/windowmanager/intern/wm_files.c =================================================================== diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 23c91dface9..6dde7a427bc 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1527,10 +1527,6 @@ static ImBuf *blend_file_thumb_from_screenshot(bContext *C, BlendThumbnail **thu return BKE_main_thumbnail_to_imbuf(NULL, *thumb_pt); } - /* Redraw to remove menus that might be open. */ - WM_redraw_windows(C); - WM_cursor_wait(true); - /* The window to capture should be a main window (without parent). */ wmWindow *win = CTX_wm_window(C); while (win && win->parent) { @@ -1563,7 +1559,6 @@ static ImBuf *blend_file_thumb_from_screenshot(bContext *C, BlendThumbnail **thu IMB_freeImBuf(thumb_ibuf); *thumb_pt = thumb; } - WM_cursor_wait(false); /* Must be freed by caller. */ return ibuf; @@ -1758,6 +1753,14 @@ static bool wm_file_write(bContext *C, /* Enforce full override check/generation on file save. */ BKE_lib_override_library_main_operations_create(bmain, true); + if (!G.background) { + /* Redraw to remove menus that might be open. */ + WM_redraw_windows(C); + } + + /* don't forget not to return without! */ + WM_cursor_wait(true); + /* blend file thumbnail */ /* Save before exit_editmode, otherwise derivedmeshes for shared data corrupt T27765. */ /* Main now can store a '.blend' thumbnail, useful for background mode @@ -1778,9 +1781,6 @@ static bool wm_file_write(bContext *C, BKE_packedfile_pack_all(bmain, reports, false); } - /* don't forget not to return without! */ - WM_cursor_wait(true); - ED_editors_flush_edits(bmain); /* First time saving. */ _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
