Automatically refresh filebrowser on window focus, and preserve path after scanning

This commit is contained in:
Antoine Pilote
2024-09-05 19:44:27 -04:00
parent 9e05e6883a
commit 422331dec2
11 changed files with 110 additions and 2 deletions

View File

@@ -34,6 +34,8 @@
#include "../Actions/EditorSelection.h"
#include "FileSystemUI.h"
#include <src/FileSystem/Directory.h>
#include "../Misc/InterfaceFonts.h"
#include "WelcomeWindow.h"
@@ -3177,6 +3179,12 @@ namespace Nuake {
mCommandBuffer->PushCommand(command);
}
void EditorInterface::OnWindowFocused()
{
filesystem->Scan();
}
bool EditorInterface::LoadProject(const std::string& projectPath)
{
FileSystem::SetRootDirectory(FileSystem::GetParentPath(projectPath));