Fix T72169: "New File" loads UI, even when disabled

Partially reverts b500f42700, callers now set this flag.
This commit is contained in:
Campbell Barton 2019-12-06 00:26:25 +11:00
parent 70b3469c0e
commit 95ca3f6536
Notes: blender-bot 2023-02-14 01:21:16 +01:00
Referenced by issue #72169, "New File" operator loads UI, even if explicitly told to not do so
2 changed files with 3 additions and 1 deletions

View File

@ -154,7 +154,7 @@ static void setup_app_data(bContext *C,
else if (BLI_listbase_is_empty(&bfd->main->screens)) {
mode = LOAD_UNDO;
}
else if ((G.fileflags & G_FILE_NO_UI) && (is_startup == false)) {
else if (G.fileflags & G_FILE_NO_UI) {
mode = LOAD_UI_OFF;
}
else {

View File

@ -291,6 +291,8 @@ void WM_init(bContext *C, int argc, const char **argv)
* otherwise the versioning cannot find the default studio-light. */
BKE_studiolight_init();
BLI_assert((G.fileflags & G_FILE_NO_UI) == 0);
wm_homefile_read(C,
NULL,
G.factory_startup,