diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index acb82412ca..745e788232 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1023,7 +1023,7 @@ void Application::editPreferences() { QFormLayout* form = new QFormLayout(); layout->addLayout(form, 1); - QLineEdit* avatarURL = new QLineEdit(_settings->value("avatarURL").toString()); + QLineEdit* avatarURL = new QLineEdit(_myAvatar.getVoxels()->getVoxelURL().toString()); avatarURL->setMinimumWidth(400); form->addRow("Avatar URL:", avatarURL); @@ -1040,7 +1040,6 @@ void Application::editPreferences() { return; } QUrl url(avatarURL->text()); - _settings->setValue("avatarURL", url); _myAvatar.getVoxels()->setVoxelURL(url); sendAvatarVoxelURLMessage(url); @@ -1532,10 +1531,6 @@ void Application::init() { _myCamera.setModeShiftRate(1.0f); _myAvatar.setDisplayingLookatVectors(false); - QUrl avatarURL = _settings->value("avatarURL").toUrl(); - _myAvatar.getVoxels()->setVoxelURL(avatarURL); - sendAvatarVoxelURLMessage(avatarURL); - QCursor::setPos(_headMouseX, _headMouseY); OculusManager::connect(); @@ -1547,6 +1542,8 @@ void Application::init() { gettimeofday(&_lastTimeIdle, NULL); loadSettings(); + + sendAvatarVoxelURLMessage(_myAvatar.getVoxels()->getVoxelURL()); } void Application::updateAvatar(float deltaTime) { diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index 918cd02c78..e5c5a76a70 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -1225,6 +1225,8 @@ void Avatar::loadData(QSettings* set) { _position.y = set->value("position_y", _position.y).toFloat(); _position.z = set->value("position_z", _position.z).toFloat(); + _voxels.setVoxelURL(set->value("voxelURL").toUrl()); + set->endGroup(); } @@ -1244,6 +1246,8 @@ void Avatar::saveData(QSettings* set) { set->setValue("position_y", _position.y); set->setValue("position_z", _position.z); + set->setValue("voxelURL", _voxels.getVoxelURL()); + set->endGroup(); }