From 130d3ab6bc8361034c1dd3f0f9caca5da056fd26 Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Thu, 29 Mar 2018 10:33:04 -0700 Subject: MAINT-8438: Setting attachment bake texture to None does not refresh the base avatar bake. --- indra/newview/lltexturectrl.cpp | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'indra') 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(); } } -- cgit v1.2.3