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
152152 request->start();
153153 }
154154
155+void AssetMappingsScriptingInterface::sortProxyModel(int column, Qt::SortOrder order) {
156+ _proxyModel.sort(column, order);
157+}
158+
155159 void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
156160 auto assetClient = DependencyManager::get<AssetClient>();
157161 auto request = assetClient->createGetAllMappingsRequest();
@@ -287,7 +291,7 @@ void AssetMappingModel::refresh() { · 129 unmodified lines
287291 item->setData(parts[i], Qt::UserRole + 2);
288292 item->setData("atp:" + fullPath, Qt::UserRole + 3);
289293 item->setData(fullPath, Qt::UserRole + 4);
290−
294+
291295 if (lastItem) {
292296 lastItem->appendRow(item);
293297 } else {