UI: Ensure collection name is set before creating default scene

This commit is contained in:
derrod
2024-07-28 19:10:28 +02:00
committed by Ryan Foster
parent b0faf38a76
commit c723b3ba04

View File

@@ -1166,6 +1166,11 @@ void OBSBasic::Load(const char *file)
if (!data) {
disableSaving--;
blog(LOG_INFO, "No scene file found, creating default scene");
const string name = filesystem::u8path(file).stem().u8string();
config_set_string(App()->GlobalConfig(), "Basic",
"SceneCollection", name.c_str());
config_set_string(App()->GlobalConfig(), "Basic",
"SceneCollectionFile", name.c_str());
CreateDefaultScene(true);
SaveProject();
return;