History

Asset Browser tweaks

Atlante45 committed 9 years ago

Commit acb0bf81 parent 191066a4 files · +180 −25Browse files

Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t