From 74fd640f160644a031731116d3f3cd60fcd597de Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Fri, 21 Aug 2015 16:49:07 -0700 Subject: [PATCH] Restore the ability to change avatars from the edit.js marketplace button. --- interface/src/Application.cpp | 1 + interface/src/ui/PreferencesDialog.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 50d60b4cb3..3fd2899360 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4125,6 +4125,7 @@ bool Application::askToSetAvatarUrl(const QString& url) { msgBox.exec(); if (msgBox.clickedButton() == bodyAndHeadButton) { + _myAvatar->useFullAvatarURL(url, modelName); emit fullAvatarURLChanged(url, modelName); } else { qCDebug(interfaceapp) << "Declined to use the avatar: " << url; diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index a6340d3955..4dfa6af96f 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -64,7 +64,6 @@ void PreferencesDialog::fullAvatarURLChanged(const QString& newValue, const QStr ui.appearanceDescription->setText(newValue); const QString APPEARANCE_LABEL_TEXT("Appearance: "); ui.appearanceLabel->setText(APPEARANCE_LABEL_TEXT + modelName); - DependencyManager::get()->getMyAvatar()->useFullAvatarURL(newValue, modelName); } void PreferencesDialog::accept() { @@ -78,7 +77,9 @@ void PreferencesDialog::accept() { } void PreferencesDialog::restoreLastGoodAvatar() { - fullAvatarURLChanged(_lastGoodAvatarURL.toString(), _lastGoodAvatarName); + const QString& url = _lastGoodAvatarURL.toString(); + fullAvatarURLChanged(url, _lastGoodAvatarName); + DependencyManager::get()->getMyAvatar()->useFullAvatarURL(url, _lastGoodAvatarName); } void PreferencesDialog::reject() {