Showing the changes to interface/src/Menu.cpp (1 of 1 file). Show all
Unified · Split
| @@ -806,19 +806,18 @@ void Menu::editPreferences() { · 805 unmodified lines | ||
| 806 | 806 | |
| 807 | 807 | QUrl faceModelURL(faceURLEdit->text()); |
| 808 | 808 | |
| 809 | + | |
| 809 | 810 | if (avatarUsernameEdit->text() != avatarUsername) { |
| 810 | 811 | // there has been a username change - set the new UUID on the avatar instance |
| 811 | 812 | applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text()); |
| 812 | 813 | |
| 813 | 814 | 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()); | |
| 815 | 817 | DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL); |
| 816 | 818 | } |
| 817 | 819 | } |
| 818 | 820 | |
| 819 | − QUrl avatarVoxelURL(avatarURL->text()); | |
| 820 | − applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL); | |
| 821 | − | |
| 822 | 821 | if (faceModelURL.toString() != faceURLString) { |
| 823 | 822 | applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL); |
| 824 | 823 | |
| @@ -827,6 +826,11 @@ void Menu::editPreferences() { · 2 unmodified lines | ||
| 827 | 826 | faceModelURL.toString().toLocal8Bit().constData()); |
| 828 | 827 | } |
| 829 | 828 | |
| 829 | + QUrl avatarVoxelURL(avatarURL->text()); | |
| 830 | + applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL); | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 830 | 834 | Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL); |
| 831 | 835 | |
| 832 | 836 | applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum()); |