fix [#34636] bpy.app.handlers.load_post not run on startup file loading after splashscreen

This commit is contained in:
Campbell Barton
2013-03-28 06:36:09 +00:00
parent ebc538c56c
commit ed99c94bef

View File

@@ -47,6 +47,7 @@
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_callbacks.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
@@ -220,8 +221,17 @@ void WM_init(bContext *C, int argc, const char **argv)
#endif
/* load last session, uses regular file reading so it has to be in end (after init py etc) */
if (U.uiflag2 & USER_KEEP_SESSION)
if (U.uiflag2 & USER_KEEP_SESSION) {
wm_recover_last_session(C, NULL);
}
else {
/* normally 'wm_homefile_read' will do this,
* however python is not initialized when called from this function.
*
* unlikey any handlers are set but its possible,
* note that recovering the last session does its own callbacks callbacks. */
BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
}
}
void WM_init_splash(bContext *C)