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