History

clear the face model URL if the username is changed in preferences

Stephen Birarda committed 13 years ago

Commit 26d5e2c1 parent 4b620261 file · +8 −4Browse files

Showing the changes to interface/src/Menu.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Menu.cpp+8−4
@@ -806,19 +806,18 @@ void Menu::editPreferences() { · 805 unmodified lines
806806
807807 QUrl faceModelURL(faceURLEdit->text());
808808
809+
809810 if (avatarUsernameEdit->text() != avatarUsername) {
810811 // there has been a username change - set the new UUID on the avatar instance
811812 applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
812813
813814 if (faceModelURL.toString() == faceURLString) {
814− // if there was no change to the face model URL then ask the data-server for what it is
815+ // if there was no change to the face model URL then clear it and ask the data-server for what it is
816+ applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(QUrl());
815817 DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
816818 }
817819 }
818820
819− QUrl avatarVoxelURL(avatarURL->text());
820− applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
821−
822821 if (faceModelURL.toString() != faceURLString) {
823822 applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL);
824823
@@ -827,6 +826,11 @@ void Menu::editPreferences() { · 2 unmodified lines
827826 faceModelURL.toString().toLocal8Bit().constData());
828827 }
829828
829+ QUrl avatarVoxelURL(avatarURL->text());
830+ applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
831+
832+
833+
830834 Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL);
831835
832836 applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum());