From 688e3fed4c255ddcfe98f08d1004dc2c0abd51ef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 May 2019 18:29:58 +1000 Subject: [PATCH] Preferences: write preferences on exit This avoids the issue where user added shortcuts or quick favourites are lost on exit. --- source/blender/windowmanager/intern/wm_init_exit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 97ba9190351..d486daf8039 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -52,6 +52,7 @@ #include "BLO_writefile.h" #include "BLO_undofile.h" +#include "BKE_blendfile.h" #include "BKE_blender.h" #include "BKE_blender_undo.h" #include "BKE_context.h" @@ -469,6 +470,10 @@ void WM_exit_ext(bContext *C, const bool do_python) WM_event_remove_handlers(C, &win->modalhandlers); ED_screen_exit(C, win, WM_window_get_active_screen(win)); } + + if (U.runtime.is_dirty) { + BKE_blendfile_userdef_write_all(NULL); + } } BLI_timer_free();