Can now drag n drop proejct in project launcher + delete or right click to remove from list

This commit is contained in:
Antoine Pilote
2024-09-17 17:32:05 -04:00
parent 07871123cb
commit ef0fde5847
3 changed files with 76 additions and 23 deletions

View File

@@ -3297,9 +3297,10 @@ namespace Nuake {
void EditorInterface::OnDragNDrop(const std::vector<std::string>& paths)
{
if (Engine::GetProject())
const bool isProjectLoaded = Engine::GetProject() != nullptr;
for (const auto& path : paths)
{
for (const auto& path : paths)
if (isProjectLoaded)
{
if (!FileSystem::FileExists(path, true))
{
@@ -3313,6 +3314,10 @@ namespace Nuake {
FileSystem::CopyFileAbsolute(path, FileSystemUI::m_CurrentDirectory->GetFullPath());
}
else
{
_WelcomeWindow->ImportProject(path);
}
}
}