Refactor new editor boundaries and test ownership
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user