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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-05-15 17:20:14 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-05-15 17:26:47 +0300
commit6dceafbde392ce0b2c2086d0906acf638d9902b2 (patch)
tree847238fb41b443f7e8ae4f1c77ea4e2874daea61 /source/blender/editors/space_file/file_ops.c
parente39737f166bd8498c3759675bb5457c2bf58f07f (diff)
Fix T63748: Long startups after network drives are disconnected.
We need to make those paths validation async, since some infamous OS is unable to provide a quick way to check whether a path is valid or not... Not much to say here, this is basic wmJob stuff really... We don’t even need complex threaded coordination locks or atomics, given how simple the changes are here. Fake-tested with some `sleep()` calls to add atificial delay, seems to work as expected.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 674735f3e1d..5ac7ff72aed 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1011,7 +1011,7 @@ static int bookmark_cleanup_exec(bContext *C, wmOperator *UNUSED(op))
BLI_make_file_string(
"/", name, BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL), BLENDER_BOOKMARK_FILE);
fsmenu_write_file(fsmenu, name);
- fsmenu_refresh_bookmarks_status(fsmenu);
+ fsmenu_refresh_bookmarks_status(CTX_wm_manager(C), fsmenu);
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
}
@@ -1567,6 +1567,9 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
/* refresh system directory menu */
fsmenu_refresh_system_category(fsmenu);
+ /* Update bookmarks 'valid' state. */
+ fsmenu_refresh_bookmarks_status(wm, fsmenu);
+
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;