Fix app-templates not resetting the user interface

Regression in 45b5f4e3df
This commit is contained in:
2020-06-19 14:05:18 +10:00
parent 41f0697501
commit 642b19c8b8

View File

@@ -905,6 +905,13 @@ void wm_homefile_read(bContext *C,
SET_FLAG_FROM_TEST(G.f, (U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0, G_FLAG_SCRIPT_AUTOEXEC);
}
if (use_data) {
if (reset_app_template) {
/* Always load UI when switching to another template. */
G.fileflags &= ~G_FILE_NO_UI;
}
}
if (use_userdef || reset_app_template) {
#ifdef WITH_PYTHON
/* This only runs once Blender has already started. */
@@ -1109,13 +1116,6 @@ void wm_homefile_read(bContext *C,
BLI_strncpy(U.app_template, app_template_override, sizeof(U.app_template));
}
if (use_data) {
if (reset_app_template) {
/* Always load UI when switching to another template. */
G.fileflags &= ~G_FILE_NO_UI;
}
}
bmain = CTX_data_main(C);
if (use_userdef) {