Refactor new editor boundaries and test ownership

This commit is contained in:
2026-04-19 15:52:28 +08:00
parent dc13b56cf3
commit 93f06e84ed
279 changed files with 6349 additions and 3238 deletions

View File

@@ -1,8 +1,6 @@
#include "ProjectBrowserModel.h"
#include "ProjectBrowserModelInternal.h"
#include "Internal/StringEncoding.h"
#include <fstream>
namespace XCEngine::UI::Editor::App {
@@ -238,9 +236,9 @@ bool ProjectBrowserModel::CreateMaterial(
}
std::filesystem::path requestedPath =
App::Internal::Utf8ToWide(trimmedName);
BuildPathFromUtf8(trimmedName);
if (!requestedPath.has_extension()) {
requestedPath += L".mat";
requestedPath.replace_extension(".mat");
}
const std::filesystem::path materialPath =
@@ -317,7 +315,7 @@ bool ProjectBrowserModel::RenameItem(
}
const std::filesystem::path destinationPath =
(sourcePath->parent_path() / App::Internal::Utf8ToWide(targetName))
(sourcePath->parent_path() / BuildPathFromUtf8(targetName))
.lexically_normal();
const std::string destinationItemId =
BuildRelativeItemId(destinationPath, m_assetsRootPath);