diff options
author | Oz Linden <oz@lindenlab.com> | 2013-04-25 16:50:02 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-04-25 16:50:02 -0400 |
commit | d7136bac52dc36cca1f5b89fdc26fd323be468c5 (patch) | |
tree | a6df73fdf39954c4d632c0d7fadc5e503136f199 /indra/newview | |
parent | 399c2baaa5e45b4fc98f2bdf115acdb6ec7526f6 (diff) |
NORSPEC-67: fix update problem by not updating texture pickers when they are open
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelface.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 10 |
2 files changed, 21 insertions, 26 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 2d2a0d6d0c..685614a8c4 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -300,9 +300,9 @@ void LLPanelFace::sendBump() U32 bumpiness = mComboBumpiness->getCurrentIndex(); if (bumpiness < BUMPY_TEXTURE) { - LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); - //texture_ctrl->setImageAssetID(LLUUID()); - texture_ctrl->clear(); + LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL; + LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); + bumpytexture_ctrl->clear(); LLSD dummy_data; onSelectMaterialTexture(dummy_data); } @@ -397,10 +397,6 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (valid) { value = ctrlTexScaleS->get(); - //if( checkFlipScaleS->get() ) - //{ - // value = -value; - //} if (comboTexGen && comboTexGen->getCurrentIndex() == 1) { @@ -635,20 +631,11 @@ void LLPanelFace::getState() } else { - llwarns << "failed getChild for 'combobox mattype'" << llendl; + LL_WARNS("Materials") << "failed getChild for 'combobox mattype'" << LL_ENDL; } getChildView("combobox mattype")->setEnabled(editable); onCommitMaterialsMedia(NULL, this); - - //if ( LLMediaEngine::getInstance()->getMediaRenderer () ) - // if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () ) - // { - // - // //mLabelTexAutoFix->setEnabled ( editable ); - // - // //mBtnAutoFix->setEnabled ( editable ); - // } bool identical; bool identical_diffuse; @@ -813,7 +800,7 @@ void LLPanelFace::getState() updateAlphaControls(getChild<LLComboBox>("combobox alphamode"),this); } - if(texture_ctrl) + if(texture_ctrl && !texture_ctrl->isPickerShown()) { if (identical_diffuse) { @@ -849,7 +836,7 @@ void LLPanelFace::getState() } } - if (shinytexture_ctrl) + if (shinytexture_ctrl && !shinytexture_ctrl->isPickerShown()) { if (identical_spec) { @@ -871,7 +858,7 @@ void LLPanelFace::getState() } } - if (bumpytexture_ctrl) + if (bumpytexture_ctrl && !bumpytexture_ctrl->isPickerShown()) { if (identical_norm) { @@ -1656,12 +1643,13 @@ void LLPanelFace::getState() void LLPanelFace::refresh() { + LL_DEBUGS("Materials") << LL_ENDL; getState(); } void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material) { //laying out UI based on material parameters (calls setVisible on various components) - LL_DEBUGS("Materials") << "Loaded material " << material_id.asString() << material->asLLSD() << LL_ENDL; + LL_DEBUGS("Materials") << "material id " << material_id.asString() << " data " << material->asLLSD() << LL_ENDL; //make a local copy of the material for editing // (prevents local edits from overwriting client state on shared materials) @@ -1941,7 +1929,7 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata) LLComboBox* combo_bumpiness = self->getChild<LLComboBox>("combobox bumpiness"); if (!combo_mattype || !combo_matmedia || !combo_shininess || !combo_bumpiness) { - llwarns << "Combo box not found...exiting." << llendl; + LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL; return; } U32 materials_media = combo_matmedia->getCurrentIndex(); @@ -2127,7 +2115,7 @@ void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_ LLPanelFace* self = (LLPanelFace*) userdata; LLTextureCtrl* texture_ctrl = self->getChild<LLTextureCtrl>("bumpytexture control"); LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID(); - LL_DEBUGS("Materials") << "Bumpy texture selected: " << bumpy_texture_ID << LL_ENDL; + LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL; LLComboBox* comboBumpy = self->getChild<LLComboBox>("combobox bumpiness"); if (!comboBumpy) { @@ -2453,6 +2441,7 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata) void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp) { + LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL; LLComboBox* combo_mattype = getChild<LLComboBox>("combobox mattype"); if (!combo_mattype) { @@ -2470,7 +2459,7 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp) break; // no default needed } - + LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL; LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(which_control); if (texture_ctrl) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 27565a8d17..1e32e7628f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1861,7 +1861,7 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS("MaterialTEs") << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (color != tep->getColor()) { @@ -1975,6 +1975,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams) { + LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL; for (U8 i = 0; i < getNumTEs(); i++) { if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID))) @@ -1987,9 +1988,11 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) { S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID); + LL_DEBUGS("MaterialTEs") << "te "<< (S32)te << " materialid " << pMaterialID.asString() << " res " << res + << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) + << LL_ENDL; if (res) { - LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL; LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2)); gPipeline.markTextured(mDrawable); mFaceMappingChanged = TRUE; @@ -2000,6 +2003,9 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << pMaterialParams->asLLSD() << " res " << res + << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) + << LL_ENDL; if (res) { gPipeline.markTextured(mDrawable); |