Bug fix: circumvent using LLs notify system.

Can't use LLs LLFolderViewItem::rename from
LLInventoryPanel::modelChanged because it's nonrobust spaghetti code
and causes randomly sized loops.

Also cleaned up the number of unused nameOrDescriptionChanged functions
introduced in a previous commit.
This commit is contained in:
Aleric Inglewood
2013-07-20 18:28:52 +02:00
parent 7162214c01
commit 85ff52be30
10 changed files with 33 additions and 63 deletions

View File

@@ -598,21 +598,29 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
}
}
void LLAgentWearables::descriptionChanged(LLUUID const& item_id)
void LLAgentWearables::nameOrDescriptionChanged(LLUUID const& item_id)
{
for (S32 i=0; i < LLWearableType::WT_COUNT; i++)
for (int i = 0; i < LLWearableType::WT_COUNT; ++i)
{
for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++)
LLWearableType::EType type = (LLWearableType::EType)i;
for (U32 j = 0; j < getWearableCount(type); ++j)
{
LLUUID curr_item_id = getWearableItemID((LLWearableType::EType)i,j);
LLUUID curr_item_id = getWearableItemID(type, j);
if (curr_item_id == item_id)
{
LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)i,j);
LLViewerWearable* wearable = getViewerWearable(type, j);
llassert(wearable);
if (!wearable) continue;
wearable->refreshNameAndDescription();
break;
// Update the name in the appearance editor.
if (LLFloaterCustomize::instanceExists())
{
LLFloaterCustomize::getInstance()->wearablesChanged(type);
}
return;
}
}
}