summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-12-04 16:09:15 -0500
committerNat Goodspeed <nat@lindenlab.com>2015-12-04 16:09:15 -0500
commitd69a0e692e420e5b95e9bcb4ad1e7c5cfa283468 (patch)
treedba5f50b894e52ad961f599702f3da801e3518b9 /indra/newview/llpanelvolume.cpp
parentc4de6b93d3c3f182fc7bf28e5c285e4d14da0764 (diff)
parent6ed6158ac68076b6a6242a3a74a3394846227e04 (diff)
Automated merge with ssh://bitbucket.org/nat_linden/viewer-no-leap-test
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rwxr-xr-xindra/newview/llpanelvolume.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index f1f87e212d..c9f8683e0e 100755
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -713,7 +713,7 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
if (LightTextureCtrl)
{
- LightTextureCtrl->setImageAssetID(LLUUID::null);
+ LightTextureCtrl->setImageAssetID(mLightSavedTexture);
}
LLVOVolume *volobjp = (LLVOVolume *) mObject.get();
@@ -722,7 +722,16 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
// Cancel the light texture as requested
// NORSPEC-292
//
- volobjp->setLightTextureID(LLUUID::null);
+ bool is_spotlight = volobjp->isLightSpotlight();
+ volobjp->setLightTextureID(mLightSavedTexture); //updates spotlight
+
+ if (!is_spotlight && mLightSavedTexture.notNull())
+ {
+ LLVector3 spot_params = volobjp->getSpotLightParams();
+ getChild<LLUICtrl>("Light FOV")->setValue(spot_params.mV[0]);
+ getChild<LLUICtrl>("Light Focus")->setValue(spot_params.mV[1]);
+ getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
+ }
}
}
@@ -821,7 +830,12 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
self->getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
}
else
- { //modifying existing params
+ { //modifying existing params, this time volobjp won't change params on its own.
+ if (volobjp->getLightTextureID() != id)
+ {
+ volobjp->setLightTextureID(id);
+ }
+
LLVector3 spot_params;
spot_params.mV[0] = (F32) self->getChild<LLUICtrl>("Light FOV")->getValue().asReal();
spot_params.mV[1] = (F32) self->getChild<LLUICtrl>("Light Focus")->getValue().asReal();