mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 20:55:10 +02:00
minor cleanup
This commit is contained in:
parent
db036d997c
commit
e14a1ad1af
1 changed files with 8 additions and 12 deletions
|
@ -61,13 +61,16 @@ Rectangle {
|
|||
property int sortIndicatorColumn: 1
|
||||
property int sortIndicatorOrder: Qt.AscendingOrder
|
||||
}
|
||||
function getSelectedSessionIDs() {
|
||||
var sessionIDs = [];
|
||||
table.selection.forEach(function (userIndex) {
|
||||
sessionIDs.push(userModelData[userIndex].sessionId);
|
||||
});
|
||||
return sessionIDs;
|
||||
}
|
||||
function refreshWithFilter() {
|
||||
// We should just be able to set settings.filtered to filter.checked, but see #3249, so send to .js for saving.
|
||||
var userIds = [];
|
||||
table.selection.forEach(function (userIndex) {
|
||||
userIds.push(userModelData[userIndex].sessionId);
|
||||
});
|
||||
table.selection.clear();
|
||||
var userIds = getSelectedSessionIDs();
|
||||
var params = {filter: filter.checked && {distance: settings.nearDistance}};
|
||||
if (userIds.length > 0) {
|
||||
params.selected = [[userIds[0]], true, true];
|
||||
|
@ -620,13 +623,6 @@ Rectangle {
|
|||
console.log('Unrecognized message:', JSON.stringify(message));
|
||||
}
|
||||
}
|
||||
function getSelectedSessionIDs() {
|
||||
var sessionIDs = [];
|
||||
table.selection.forEach(function (userIndex) {
|
||||
sessionIDs.push(userModelData[userIndex].sessionId);
|
||||
});
|
||||
return sessionIDs;
|
||||
}
|
||||
function sortModel() {
|
||||
var sortProperty = table.getColumn(table.sortIndicatorColumn).role;
|
||||
var before = (table.sortIndicatorOrder === Qt.AscendingOrder) ? -1 : 1;
|
||||
|
|
Loading…
Reference in a new issue