From 4eeff2ed2143645a78c900f17afae0d41e4ee245 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 10 Sep 2022 08:54:16 -0500 Subject: [PATCH] Set default prefabs config filepath --- src/config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 16872460..05e589ba 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -741,6 +741,10 @@ void ProjectConfig::setPrefabFilepath(QString filepath) { } QString ProjectConfig::getPrefabFilepath() { + if (this->prefabFilepath.isEmpty()) { + // Default to the /prefabs.json, if no path exists. + this->setPrefabFilepath(QDir(this->projectDir).filePath("prefabs.json")); + } return this->prefabFilepath; }