From ecb29206859bf3294a716aa0dd32fb61cb7bab92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 16 Apr 2016 13:50:57 +0200 Subject: [PATCH] Fixed shift select functionality in grid view. --- YACReaderLibrary/qml/GridComicsView.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/YACReaderLibrary/qml/GridComicsView.qml b/YACReaderLibrary/qml/GridComicsView.qml index 3a5659cf..b745bfb4 100644 --- a/YACReaderLibrary/qml/GridComicsView.qml +++ b/YACReaderLibrary/qml/GridComicsView.qml @@ -39,14 +39,6 @@ Rectangle { height: parent.height anchors.margins: 0 - function selectAll(from,to) - { - for(var i = from;i<=to;i++) - { - comicsSelectionHelper.selectIndex(i); - } - } - Component { id: appDelegate Rectangle @@ -160,6 +152,14 @@ Rectangle { comicsSelectionHelper.selectedItem(index); } + function selectAll(from,to) + { + for(var i = from;i<=to;i++) + { + comicsSelectionHelper.selectIndex(i); + } + } + onPressed: { var ci = grid.currentIndex; //save current index