From b2f59a189bab817ddcae7dec6034db4e0345e286 Mon Sep 17 00:00:00 2001 From: antopilo Date: Wed, 29 Jun 2022 18:12:29 -0400 Subject: [PATCH] Fixed File system default folder loaded. and filetree opened by default --- Editor/src/Windows/FileSystemUI.cpp | 2 +- Editor/src/Windows/WelcomeWindow.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Editor/src/Windows/FileSystemUI.cpp b/Editor/src/Windows/FileSystemUI.cpp index a0f0e27d..0054a8fb 100644 --- a/Editor/src/Windows/FileSystemUI.cpp +++ b/Editor/src/Windows/FileSystemUI.cpp @@ -237,7 +237,7 @@ namespace Nuake { if (ImGui::BeginChild("Tree browser", ImVec2(sz1, avail.y))) { - ImGuiTreeNodeFlags base_flags = ImGuiTreeNodeFlags_SpanAvailWidth; + ImGuiTreeNodeFlags base_flags = ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_DefaultOpen; bool is_selected = m_CurrentDirectory == FileSystem::RootDirectory; if (is_selected) diff --git a/Editor/src/Windows/WelcomeWindow.cpp b/Editor/src/Windows/WelcomeWindow.cpp index 32b98272..47d15e62 100644 --- a/Editor/src/Windows/WelcomeWindow.cpp +++ b/Editor/src/Windows/WelcomeWindow.cpp @@ -199,10 +199,14 @@ namespace Nuake auto project = Project::New(); auto projectFileData = FileSystem::ReadFile(projectPath, true); - try { + try + { project->Deserialize(projectFileData); project->FullPath = projectPath; + Engine::LoadProject(project); + + _Editor->filesystem->m_CurrentDirectory = Nuake::FileSystem::RootDirectory; } catch (std::exception exception) {