Fixed File system default folder loaded. and filetree opened by default

This commit is contained in:
antopilo
2022-06-29 18:12:29 -04:00
parent 52c993cecd
commit b2f59a189b
2 changed files with 6 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)
{