summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
committerJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
commit1e586749efeeb8c40503330572680a8709ae5487 (patch)
tree5c1ebee5dbdb5004f354b9fb0837d60f6dd3cfcc /indra/newview/llpanelvolume.cpp
parent32f16633c77564d567ed0752e56eb38abb916ccd (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
STORM-2145 Merge up to viewer-release
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index c9f8683e0e..b1895bfc9b 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -710,22 +710,20 @@ void LLPanelVolume::onLightCancelColor(const LLSD& data)
void LLPanelVolume::onLightCancelTexture(const LLSD& data)
{
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
-
- if (LightTextureCtrl)
- {
- LightTextureCtrl->setImageAssetID(mLightSavedTexture);
- }
-
LLVOVolume *volobjp = (LLVOVolume *) mObject.get();
- if(volobjp)
+
+ if (volobjp && LightTextureCtrl)
{
// Cancel the light texture as requested
// NORSPEC-292
- //
+ //
+ // Texture picker triggers cancel both in case of actual cancel and in case of
+ // selection of "None" texture.
+ LLUUID tex_id = LightTextureCtrl->getImageAssetID();
bool is_spotlight = volobjp->isLightSpotlight();
- volobjp->setLightTextureID(mLightSavedTexture); //updates spotlight
+ volobjp->setLightTextureID(tex_id); //updates spotlight
- if (!is_spotlight && mLightSavedTexture.notNull())
+ if (!is_spotlight && tex_id.notNull())
{
LLVector3 spot_params = volobjp->getSpotLightParams();
getChild<LLUICtrl>("Light FOV")->setValue(spot_params.mV[0]);
@@ -769,7 +767,6 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data)
{
LLUUID id = LightTextureCtrl->getImageAssetID();
volobjp->setLightTextureID(id);
- mLightSavedTexture = id;
}
}