Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -239,6 +239,7 @@ void AssetMappingModel::refresh() { · 238 unmodified lines | ||
| 239 | 239 | |
| 240 | 240 | connect(request, &GetAllMappingsRequest::finished, this, [this](GetAllMappingsRequest* request) mutable { |
| 241 | 241 | if (request->getError() == MappingRequest::NoError) { |
| 242 | + int bakesPendingCount = 0; | |
| 242 | 243 | auto mappings = request->getMappings(); |
| 243 | 244 | auto existingPaths = _pathToItemMap.keys(); |
| 244 | 245 | for (auto& mapping : mappings) { |
| @@ -287,6 +288,9 @@ void AssetMappingModel::refresh() { · 42 unmodified lines | ||
| 287 | 288 | auto statusString = isFolder ? "--" : bakingStatusToString(mapping.second.status); |
| 288 | 289 | lastItem->setData(statusString, Qt::UserRole + 5); |
| 289 | 290 | lastItem->setData(mapping.second.bakingErrors, Qt::UserRole + 6); |
| 291 | + if (mapping.second.status == Pending) { | |
| 292 | + ++bakesPendingCount; | |
| 293 | + } | |
| 290 | 294 | } |
| 291 | 295 | |
| 292 | 296 | Q_ASSERT(fullPath == path); |
| @@ -334,6 +338,11 @@ void AssetMappingModel::refresh() { · 41 unmodified lines | ||
| 334 | 338 | item = nextItem; |
| 335 | 339 | } |
| 336 | 340 | } |
| 341 | + | |
| 342 | + if (bakesPendingCount != _bakesPendingCount) { | |
| 343 | + _bakesPendingCount = bakesPendingCount; | |
| 344 | + emit bakesPendingCountChanged(_bakesPendingCount); | |
| 345 | + } | |
| 337 | 346 | } else { |
| 338 | 347 | emit errorGettingMappings(request->getErrorString()); |
| 339 | 348 | } |