on xenial help sign in
make ApplicationsModelStageFiltered logic use the model parameter
7f4e505Gerry Boland
Components/ApplicationsModelStageFiltered.qml+4−3
@@ -23,7 +23,7 @@ SortFilterProxyModel {
23 property int stage
23 property int stage
24
24
25 function get(index) {
25 function get(index) {
26− return ApplicationManager.get(mapRowToSource(index));
26+ return model.get(mapRowToSource(index));
27 }
27 }
28
28
29 function move(from, to) {
29 function move(from, to) {
@@ -35,10 +35,11 @@ SortFilterProxyModel {
35 var realTo = mapRowToSource(to);
35 var realTo = mapRowToSource(to);
36 if (realTo == -1) {
36 if (realTo == -1) {
37 // assuming wanting to move to end of list
37 // assuming wanting to move to end of list
38− realTo = ApplicationManager.count;
38+ realTo = model.count - 1;
39 }
39 }
40+
40 if (realFrom == realTo) return;
41 if (realFrom == realTo) return;
41− ApplicationManager.move(realFrom, realTo);
42+ model.move(realFrom, realTo);
42 }
43 }
43
44
44 model: ApplicationManager
45 model: ApplicationManager