From 5da01f00743d34c030cbb9dfbd9926616e32eccb Mon Sep 17 00:00:00 2001 From: David Kelly Date: Thu, 22 Jun 2017 07:09:24 -0700 Subject: [PATCH] updated comments --- interface/src/Application.cpp | 9 ++++++--- interface/src/avatar/MyAvatar.cpp | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 932c710df4..bab6a544d8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -859,11 +859,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo } ResourceCache::setRequestLimit(concurrentDownloads); - // perhaps override the avatar url. We test later for validity, so - // no need to do so here. If someone specifies both --avatarURL - // and --replaceAvatarURL, the replaceAvatarURL wins. + // perhaps override the avatar url. Since we will test later for validity + // we don't need to do so here. QString avatarURL = getCmdOption(argc, constArgv, "--avatarURL"); _avatarOverrideUrl = QUrl::fromUserInput(avatarURL); + + // If someone specifies both --avatarURL and --replaceAvatarURL, + // the replaceAvatarURL wins. So only set the _overrideUrl if this + // does have a non-empty string. QString replaceURL = getCmdOption(argc, constArgv, "--replaceAvatarURL"); if (!replaceURL.isEmpty()) { _avatarOverrideUrl = QUrl::fromUserInput(replaceURL); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index e6c9ac9fb6..4a0d753695 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -929,8 +929,9 @@ void MyAvatar::saveData() { settings.setValue("scale", _targetScale); - // only save the fullAvatarURL if it has not been overwritten on command line, or it - // has but we want it saved + // only save the fullAvatarURL if it has not been overwritten on command line + // (so the overrideURL is not valid), or it was overridden _and_ we specified + // --replaceAvatarURL (so _saveAvatarOverrideUrl is true) if (qApp->getSaveAvatarOverrideUrl() || !qApp->getAvatarOverrideUrl().isValid() ) { settings.setValue("fullAvatarURL", _fullAvatarURLFromPreferences == AvatarData::defaultFullAvatarModelUrl() ?