diff options
author | Neal Orman <nyx@lindenlab.com> | 2009-10-22 22:25:38 +0000 |
---|---|---|
committer | Neal Orman <nyx@lindenlab.com> | 2009-10-22 22:25:38 +0000 |
commit | 4e6fd496eef05d3ab59f3f35878be601b18350f0 (patch) | |
tree | bf8103912bf4359c140a5fc60ba1dedc70d05b7d /indra/newview/llagentwearables.cpp | |
parent | e5484e56b3c13e65bd31d7bf21c1cd3a2d9333f2 (diff) |
EXT-1822 changing textures in appearance not immediate
Texture changes in appearance editor were not taking effect immediately. Changed texture setting code to refresh local bake of textures.
Code reviewed by Vir
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index c1866c36a2..af2f3613b8 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -668,9 +668,17 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl return MAX_WEARABLES_PER_TYPE; } -void LLAgentWearables::popWearable(const EWearableType type, LLWearable *wearable) +void LLAgentWearables::popWearable(LLWearable *wearable) { - U32 index = getWearableIndex(type, wearable); + if (wearable == NULL) + { + // nothing to do here. move along. + return; + } + + U32 index = getWearableIndex(wearable); + EWearableType type = wearable->getType(); + if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type)) { popWearable(type, index); @@ -685,8 +693,14 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index) } } -U32 LLAgentWearables::getWearableIndex(const EWearableType type, LLWearable *wearable) +U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) { + if (wearable == NULL) + { + return MAX_WEARABLES_PER_TYPE; + } + + const EWearableType type = wearable->getType(); wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { |