summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-03-29 10:33:04 -0700
committerAnchor Linden <anchor@lindenlab.com>2018-03-29 10:33:04 -0700
commit130d3ab6bc8361034c1dd3f0f9caca5da056fd26 (patch)
tree8871e2d85c291392ce21efe28320c046488c2524 /indra/newview
parent7c6dcae68007489e616af00cfccbbd6b2c2eb50d (diff)
MAINT-8438: Setting attachment bake texture to None does not refresh the base avatar bake.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexturectrl.cpp38
1 files changed, 13 insertions, 25 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 7f1169a5c2..0c823931c1 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -962,7 +962,7 @@ void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data
S8 type = combo_box->getValue().asInteger();
- LLUUID imageID = LLUUID::null;
+ LLUUID imageID = self->mDefaultImageAssetID;
if (type == 0)
{
imageID = IMG_USE_BAKED_HEAD;
@@ -988,34 +988,22 @@ void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data
imageID = IMG_USE_BAKED_HAIR;
}
- if (imageID.notNull())
- {
- self->setImageID(imageID);
- self->mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
-
- if (!self->mPreviewSettingChanged)
- {
- self->mCanPreview = gSavedSettings.getBOOL("TextureLivePreview");
- }
- else
- {
- self->mPreviewSettingChanged = false;
- }
+ self->setImageID(imageID);
+ self->mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
- if (self->mCanPreview)
- {
- // only commit intentional selections, not implicit ones
- self->commitIfImmediateSet();
- }
+ if (!self->mPreviewSettingChanged)
+ {
+ self->mCanPreview = gSavedSettings.getBOOL("TextureLivePreview");
}
else
{
- self->setCanApply(true, true);
- self->setImageID(self->mDefaultImageAssetID);
- if (self->mCanPreview)
- {
- self->commitIfImmediateSet();
- }
+ self->mPreviewSettingChanged = false;
+ }
+
+ if (self->mCanPreview)
+ {
+ // only commit intentional selections, not implicit ones
+ self->commitIfImmediateSet();
}
}