fix: 修复多个UI框架问题

- 修复 InspectorPanel InputText 使用 data()/capacity() 的错误
- 修复未使用变量警告
- 修复 ProjectManager 路径重复拼接 bug (Assets/Assets)
- 返回按钮在 Assets 目录时禁用但保持显示
- 删除 ProjectPanel 创建按钮,调整 Refresh 位置
- 修复 ProjectPanel 搜索过滤时的 ID 冲突
- 修复 InspectorPanel CollapsingHeader ID 冲突
This commit is contained in:
2026-03-12 18:58:06 +08:00
parent da7f19e9e8
commit 6e12efb67e
4 changed files with 31 additions and 23 deletions

View File

@@ -34,10 +34,10 @@ void ProjectManager::NavigateBack() {
}
std::string ProjectManager::GetCurrentPath() const {
if (m_path.empty()) return "";
std::string result;
for (size_t i = 0; i < m_path.size(); i++) {
if (i > 0) result += "/";
if (m_path.empty()) return "Assets";
std::string result = "Assets";
for (size_t i = 1; i < m_path.size(); i++) {
result += "/";
result += m_path[i]->name;
}
return result;
@@ -99,8 +99,10 @@ void ProjectManager::Initialize(const std::string& projectPath) {
}
std::wstring ProjectManager::GetCurrentFullPathW() const {
if (m_path.empty()) return Utf8ToWstring(m_projectPath);
std::wstring fullPath = Utf8ToWstring(m_projectPath);
for (size_t i = 0; i < m_path.size(); i++) {
for (size_t i = 1; i < m_path.size(); i++) {
fullPath += L"/" + Utf8ToWstring(m_path[i]->name);
}
return fullPath;