History

Merge pull request #12637 from druiz17/fix-asset-server-qml

Fix asset server qml sorting

John Conklin II committed 8 years ago

Commit 586fb482 parents 46fb203 ad9ca0d4 files · +71 −58Browse files

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

Unified · Split

interface/src/scripting/AssetMappingsScriptingInterface.cpp+5−1
@@ -152,6 +152,10 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 151 unmodified lines
152 request->start();152 request->start();
153}153}
154 154
155void AssetMappingsScriptingInterface::sortProxyModel(int column, Qt::SortOrder order) {
156 _proxyModel.sort(column, order);
157}
158
155void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {159void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
156 auto assetClient = DependencyManager::get<AssetClient>();160 auto assetClient = DependencyManager::get<AssetClient>();
157 auto request = assetClient->createGetAllMappingsRequest();161 auto request = assetClient->createGetAllMappingsRequest();
@@ -287,7 +291,7 @@ void AssetMappingModel::refresh() { · 129 unmodified lines
287 item->setData(parts[i], Qt::UserRole + 2);291 item->setData(parts[i], Qt::UserRole + 2);
288 item->setData("atp:" + fullPath, Qt::UserRole + 3);292 item->setData("atp:" + fullPath, Qt::UserRole + 3);
289 item->setData(fullPath, Qt::UserRole + 4);293 item->setData(fullPath, Qt::UserRole + 4);
290 294
291 if (lastItem) {295 if (lastItem) {
292 lastItem->appendRow(item);296 lastItem->appendRow(item);
293 } else {297 } else {