mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:23:09 +02:00
handling for leading slashes while loading mappings
This commit is contained in:
parent
7b08ae3747
commit
6f044e1cd3
1 changed files with 4 additions and 3 deletions
|
@ -137,12 +137,13 @@ void AssetMappingModel::refresh() {
|
||||||
|
|
||||||
existingPaths.removeOne(mapping.first);
|
existingPaths.removeOne(mapping.first);
|
||||||
|
|
||||||
QString fullPath = "";
|
QString fullPath = "/";
|
||||||
|
|
||||||
QStandardItem* lastItem = nullptr;
|
QStandardItem* lastItem = nullptr;
|
||||||
|
|
||||||
for (int i = 0; i < length; ++i) {
|
// start index at 1 to avoid empty string from leading slash
|
||||||
fullPath += (i == 0 ? "" : "/") + parts[i];
|
for (int i = 1; i < length; ++i) {
|
||||||
|
fullPath += (i == 1 ? "" : "/") + parts[i];
|
||||||
|
|
||||||
auto it = _pathToItemMap.find(fullPath);
|
auto it = _pathToItemMap.find(fullPath);
|
||||||
if (it == _pathToItemMap.end()) {
|
if (it == _pathToItemMap.end()) {
|
||||||
|
|
Loading…
Reference in a new issue