From daf81bbcb8cb963ea5b020e0a70bf7640f7ca762 Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Fri, 31 Aug 2018 00:29:06 +0300 Subject: [PATCH] FB17982 Avatar App reloads existing selected bookmark on app relaunch --- interface/resources/qml/hifi/AvatarApp.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/AvatarApp.qml b/interface/resources/qml/hifi/AvatarApp.qml index d8eae311d8..0c950a49d8 100644 --- a/interface/resources/qml/hifi/AvatarApp.qml +++ b/interface/resources/qml/hifi/AvatarApp.qml @@ -175,7 +175,14 @@ Rectangle { displayNameInput.text = getAvatarsData.displayName; currentAvatarSettings = getAvatarsData.currentAvatarSettings; - updateCurrentAvatarInBookmarks(currentAvatar); + var bookmarkAvatarIndex = allAvatars.findAvatarIndexByValue(currentAvatar); + if (bookmarkAvatarIndex === -1) { + currentAvatar.name = ''; + } else { + currentAvatar.name = allAvatars.get(bookmarkAvatarIndex).name; + allAvatars.move(bookmarkAvatarIndex, 0, 1); + } + view.setPage(0); } else if (message.method === 'updateAvatarInBookmarks') { updateCurrentAvatarInBookmarks(currentAvatar); } else if (message.method === 'selectAvatarEntity') {