diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-01 12:56:50 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-01 12:56:50 -0500 |
commit | e44c097aee27526869321a4ccd9b240cfbecabc0 (patch) | |
tree | 144c667632a4ddb2a793dd1932ee5bc999a321f9 | |
parent | 89816222d2de855204413700d023fb4102ed6307 (diff) | |
parent | 2eaf35b946630ab6b8635e74d5e7f2188c179e4b (diff) |
merge changes for ui fixes
-rw-r--r-- | indra/newview/llpanelface.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 1 |
3 files changed, 35 insertions, 3 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 5c4c2693f8..ca161a8654 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1368,10 +1368,10 @@ void LLPanelFace::updateMaterial() mMaterial.reset(); mMaterialID = LLMaterialID::null; // Delete existing material entry... - + LLSelectMgr::getInstance()->selectionRemoveMaterial(); // Hold off any further updates till this one's // acknowledged. - //mUpdateInFlight = true; + mUpdateInFlight = true; } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 91d737ee95..4623d32cff 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2017,7 +2017,7 @@ void LLSelectMgr::selectionSetMaterial(LLMaterialPtr material) { if (object->permModify()) { - llinfos << "Putting material on object " << object->getID() << " face " << face << ", material: " << mMaterial->asLLSD() << llendl; + LL_INFOS("Materials") << "Putting material on object " << object->getID() << " face " << face << ", material: " << mMaterial->asLLSD() << LL_ENDL; LLMaterialMgr::getInstance()->put(object->getID(),face,*mMaterial); object->setTEMaterialParams(face,mMaterial); } @@ -2040,6 +2040,37 @@ void LLSelectMgr::selectionSetMaterial(LLMaterialPtr material) mSelectedObjects->applyToObjects( &func2 ); } +void LLSelectMgr::selectionRemoveMaterial() +{ + struct f1 : public LLSelectedTEFunctor + { + bool apply(LLViewerObject* object, S32 face) + { + if (object->permModify()) + { + LL_INFOS("Materials") << "Removing material from object " << object->getID() << " face " << face << LL_ENDL; + LLMaterialMgr::getInstance()->remove(object->getID(),face); + object->setTEMaterialID(face,LLMaterialID::null); + } + return true; + } + } func1; + mSelectedObjects->applyToTEs( &func1 ); + + struct f2 : public LLSelectedObjectFunctor + { + virtual bool apply(LLViewerObject* object) + { + if (object->permModify()) + { + object->sendTEUpdate(); + } + return true; + } + } func2; + mSelectedObjects->applyToObjects( &func2 ); +} + //----------------------------------------------------------------------------- // findObjectPermissions() diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 65f3ea96e3..9d187f6272 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -543,6 +543,7 @@ public: void selectionSetIncludeInSearch(bool include_in_search); void selectionSetGlow(const F32 glow); void selectionSetMaterial(LLMaterialPtr material); + void selectionRemoveMaterial(); void selectionSetObjectPermissions(U8 perm_field, BOOL set, U32 perm_mask, BOOL override = FALSE); void selectionSetObjectName(const std::string& name); |