forked from bartvdbraak/blender
Fix splash screen showing on startup with files loaded by scripts
Suppressing the splash was only done when passing in an argument from the command line. Remove G.file_loaded, as it is misleading, only set once on startup, replace with G.relbase_valid which is used everywhere else to check if the file path should be used.
This commit is contained in:
parent
c4ea5cb1a3
commit
ab9ec193c3
@ -45,7 +45,6 @@ typedef struct Global {
|
||||
|
||||
/** When set: `G_MAIN->name` contains valid relative base path. */
|
||||
bool relbase_valid;
|
||||
bool file_loaded;
|
||||
bool save_over;
|
||||
|
||||
/** Strings of recent opened files. */
|
||||
|
@ -551,7 +551,8 @@ int main(int argc,
|
||||
WM_exit(C);
|
||||
}
|
||||
else {
|
||||
if (!G.file_loaded) {
|
||||
/* When no file is loaded, show the splash screen. */
|
||||
if (!G.relbase_valid) {
|
||||
WM_init_splash(C);
|
||||
}
|
||||
WM_main(C);
|
||||
|
@ -2008,8 +2008,6 @@ static int arg_handle_load_file(int UNUSED(argc), const char **argv, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
G.file_loaded = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user