Showing the changes to interface/src/Menu.cpp (1 of 3 files). Show all
Unified · Split
| @@ -804,21 +804,27 @@ void Menu::editPreferences() { · 803 unmodified lines | ||
| 804 | 804 | return; |
| 805 | 805 | } |
| 806 | 806 | |
| 807 | + QUrl faceModelURL(faceURLEdit->text()); | |
| 808 | + | |
| 807 | 809 | if (avatarUsernameEdit->text() != avatarUsername) { |
| 808 | − // there has been a UUID change - set the new UUID on the avatar instance | |
| 810 | + // there has been a username change - set the new UUID on the avatar instance | |
| 809 | 811 | applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text()); |
| 810 | 812 | |
| 813 | + 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 | + DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL); | |
| 816 | + } | |
| 811 | 817 | } |
| 812 | 818 | |
| 813 | 819 | QUrl avatarVoxelURL(avatarURL->text()); |
| 814 | 820 | applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL); |
| 815 | 821 | |
| 816 | − QUrl faceModelURL(faceURLEdit->text()); | |
| 817 | 822 | if (faceModelURL.toString() != faceURLString) { |
| 818 | 823 | applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL); |
| 819 | 824 | |
| 820 | 825 | // send the new face mesh URL to the data-server (if we have a client UUID) |
| 821 | − DataServerClient::putValueForKey("mesh", faceModelURL.toString().toLocal8Bit().constData()); | |
| 826 | + DataServerClient::putValueForKey(DataServerKey::FaceMeshURL, | |
| 827 | + faceModelURL.toString().toLocal8Bit().constData()); | |
| 822 | 828 | } |
| 823 | 829 | |
| 824 | 830 | Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL); |