on xenial help sign in
make ApplicationsModelStageFiltered logic use the model parameter
commit7f4e505d89ff2a9df308678b02349fd7503e0406 authorGerry Boland <gerry.boland@canonical.com> dateMon 9 Sep 2013, 12:20 (13 years ago) parentbb3e943
1 file changed+4−3
Components/ApplicationsModelStageFiltered.qml+4−3
Components/ApplicationsModelStageFiltered.qml+4−3
@@ -23,7 +23,7 @@ SortFilterProxyModel {
2323 property int stage
2424
2525 function get(index) {
26− return ApplicationManager.get(mapRowToSource(index));
26+ return model.get(mapRowToSource(index));
2727 }
2828
2929 function move(from, to) {
@@ -35,10 +35,11 @@ SortFilterProxyModel {
3535 var realTo = mapRowToSource(to);
3636 if (realTo == -1) {
3737 // assuming wanting to move to end of list
38− realTo = ApplicationManager.count;
38+ realTo = model.count - 1;
3939 }
40+
4041 if (realFrom == realTo) return;
41− ApplicationManager.move(realFrom, realTo);
42+ model.move(realFrom, realTo);
4243 }
4344
4445 model: ApplicationManager