Fix for Trusted option, loading new file

Would use the setting of the previously loaded file, now re-initialize from preferences.
This commit is contained in:
Campbell Barton 2015-01-20 16:38:31 +11:00
parent 1d56f456f7
commit 9e5c3a1fa9

@ -561,6 +561,10 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
/* options exclude eachother */ /* options exclude eachother */
BLI_assert((from_memory && custom_file) == 0); BLI_assert((from_memory && custom_file) == 0);
if ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) {
BKE_BIT_TEST_SET(G.f, (U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0, G_SCRIPT_AUTOEXEC);
}
BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE); BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE);
UI_view2d_zoom_cache_reset(); UI_view2d_zoom_cache_reset();