Fix asset server qml sorting
Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -152,6 +152,10 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 151 unmodified lines | |||
| 152 | request->start(); | 152 | request->start(); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | void AssetMappingsScriptingInterface::sortProxyModel(int column, Qt::SortOrder order) { | ||
| 156 | _proxyModel.sort(column, order); | ||
| 157 | } | ||
| 158 | |||
| 155 | void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { | 159 | void 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 { |