Skip to content
Snippets Groups Projects
Commit 01bb57ad authored by Kitty Barnett's avatar Kitty Barnett
Browse files

[FIXED] @setenv_XXX commands affect the local rather than edit environment...

[FIXED] @setenv_XXX commands affect the local rather than edit environment when @setenv restricted and @setenv_daycycle was issued
parent 43bd5d83
No related branches found
No related tags found
No related merge requests found
......@@ -479,16 +479,17 @@ LLSettingsSky::ptr_t RlvEnvironment::getTargetSky(bool forSetCmd)
if (forSetCmd)
{
bool isSharedEnv = !pEnv->getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL),
hasLocalDayCycle = !isSharedEnv && pEnv->getEnvironmentDay(LLEnvironment::ENV_LOCAL),
LLEnvironment::EnvSelection_t targetEnv = getTargetEnvironment();
bool isSharedEnv = !pEnv->getEnvironmentFixedSky(targetEnv),
hasLocalDayCycle = !isSharedEnv && pEnv->getEnvironmentDay(targetEnv),
isLocalTransition = !hasLocalDayCycle && pEnv->getCurrentEnvironmentInstance()->isTransition();
if ( (isSharedEnv) || (hasLocalDayCycle) || (isLocalTransition) )
{
LLSettingsSky::ptr_t pSky = (isSharedEnv) ? pEnv->getEnvironmentFixedSky(LLEnvironment::ENV_PARCEL, true)->buildClone()
: (hasLocalDayCycle) ? pEnv->getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL)->buildClone()
: pEnv->getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
pEnv->setEnvironment(LLEnvironment::ENV_LOCAL, pSky);
pEnv->setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
: (hasLocalDayCycle) ? pEnv->getEnvironmentFixedSky(targetEnv)->buildClone()
: pEnv->getEnvironmentFixedSky(targetEnv);
pEnv->setEnvironment(targetEnv, pSky);
pEnv->setSelectedEnvironment(targetEnv, LLEnvironment::TRANSITION_INSTANT);
pEnv->updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment