mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +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);
|
||||
|
||||
QString fullPath = "";
|
||||
QString fullPath = "/";
|
||||
|
||||
QStandardItem* lastItem = nullptr;
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
fullPath += (i == 0 ? "" : "/") + parts[i];
|
||||
// start index at 1 to avoid empty string from leading slash
|
||||
for (int i = 1; i < length; ++i) {
|
||||
fullPath += (i == 1 ? "" : "/") + parts[i];
|
||||
|
||||
auto it = _pathToItemMap.find(fullPath);
|
||||
if (it == _pathToItemMap.end()) {
|
||||
|
|
Loading…
Reference in a new issue