Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -174,6 +174,19 @@ void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString new · 173 unmodified lines | ||
| 174 | 174 | request->start(); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | +bool AssetMappingModel::isKnownFolder(QString path) const { | |
| 178 | + if (!path.endsWith("/")) { | |
| 179 | + return false; | |
| 180 | + } | |
| 181 | + | |
| 182 | + auto existingPaths = _pathToItemMap.keys(); | |
| 183 | + for (auto& entry : existingPaths) { | |
| 184 | + if (entry.startsWith(path)) { | |
| 185 | + return true; | |
| 186 | + } | |
| 187 | + } | |
| 188 | + return false; | |
| 189 | +} | |
| 177 | 190 | |
| 178 | 191 | AssetMappingItem::AssetMappingItem(const QString& name, const QString& fullPath, bool isFolder) : |
| 179 | 192 | name(name), |