diff options
Diffstat (limited to 'collectionsorter.cpp')
-rwxr-xr-x | collectionsorter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/collectionsorter.cpp b/collectionsorter.cpp index 5925acc..803bc38 100755 --- a/collectionsorter.cpp +++ b/collectionsorter.cpp @@ -39,13 +39,13 @@ QModelIndex CollectionSorter::peekNext() const { if(m_selected + 1 >= rowCount() || rowCount() == 0) return QModelIndex(); - return index(m_selected + 1, 0); + return mapToSource(index(m_selected + 1, 0)); } QModelIndex CollectionSorter::moveNext() { QModelIndex next = peekNext(); - setCurrentItem(next); + setCurrentItem(mapFromSource(next)); return next; } @@ -53,13 +53,13 @@ QModelIndex CollectionSorter::peekPrevious() const { if(m_selected <= 0 || rowCount() == 0) return QModelIndex(); - return index(m_selected - 1, 0); + return mapToSource(index(m_selected - 1, 0)); } QModelIndex CollectionSorter::movePrevious() { QModelIndex previous = peekPrevious(); - setCurrentItem(previous); + setCurrentItem(mapFromSource(previous)); return previous; } QModelIndex CollectionSorter::currentItem() const |