diff options
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rwxr-xr-x | indra/newview/llpanelface.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 31e67960bd..8d77aae9ec 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -318,16 +318,18 @@ void LLPanelFace::sendTexGen() void LLPanelFace::sendShiny(U32 shininess) { + LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control"); + if (shininess < SHINY_TEXTURE) - { - LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control"); + { texture_ctrl->clear(); texture_ctrl->setImageAssetID(LLUUID()); + + U8 shiny = (U8) shininess & TEM_SHINY_MASK; + LLSelectMgr::getInstance()->selectionSetShiny( shiny ); } - U8 shiny = (U8) shininess & TEM_SHINY_MASK; - LLSelectMgr::getInstance()->selectionSetShiny( shiny ); - updateShinyControls(shininess == SHINY_TEXTURE, true); + updateShinyControls(!texture_ctrl->getImageAssetID().isNull(), true); updateMaterial(); } @@ -721,9 +723,11 @@ void LLPanelFace::updateUI() LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess"); + shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE; + if (combobox_shininess) { - combobox_shininess->selectNthItem(specmap_id.isNull() ? (S32)shiny : SHINY_TEXTURE); + combobox_shininess->selectNthItem((S32)shiny); } else { @@ -2276,6 +2280,7 @@ void LLPanelFace::onCommitNormalTexture( const LLSD& data ) void LLPanelFace::onCancelSpecularTexture(const LLSD& data) { + U8 shiny = 0; struct get_shiny : public LLSelectedTEGetFunctor<U8> { @@ -2285,6 +2290,9 @@ void LLPanelFace::onCancelSpecularTexture(const LLSD& data) } } func; LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, shiny ); + + LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID(); + shiny = spec_map_id.isNull() ? shiny : SHINY_TEXTURE; sendShiny(shiny); } |