move selected avatar to the beginning of the page

This commit is contained in:
Alexander Ivash 2018-04-27 21:19:45 +03:00
parent e0a8d90141
commit 10e5f03f5e

View file

@ -39,7 +39,7 @@ Rectangle {
} }
} }
selectedAvatarId = allAvatars.get(1).url selectedAvatarId = allAvatars.get(0).url
console.debug('wearables: ', selectedAvatar.wearables) console.debug('wearables: ', selectedAvatar.wearables)
view.setPage(0) view.setPage(0)
@ -540,7 +540,9 @@ Rectangle {
popup.onButton2Clicked = function() { popup.onButton2Clicked = function() {
selectedAvatarId = currentItem.url; selectedAvatarId = currentItem.url;
popup.close(); popup.close();
delegateRoot.GridView.view.currentIndex = index;
pageOfAvatars.move(index, 0, 1);
delegateRoot.GridView.view.currentIndex = 0;
} }
popup.open(); popup.open();
} }