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:
authorHarley Acheson <harley.acheson@gmail.com>2021-09-16 23:13:15 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-09-16 23:13:15 +0300
commit7a9cfd08a8d7415ff004809cf62570be9152273e (patch)
tree86f1b65609a6da6cde675461231198dc24332e12
parentdb7fca3588aab72e49a74cbb2c236f86c0e0e6c1 (diff)
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
-rw-r--r--source/blender/windowmanager/intern/wm_files.c16
1 files changed, 8 insertions, 8 deletions
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. */