summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-11-01 15:12:14 +0200
committerPaul Guslisty <pguslisty@productengine.com>2010-11-01 15:12:14 +0200
commitdb56afd656fe978e0a67a29f67bd8434141ffcaa (patch)
tree98d0757d4c0f405819544c33a4bcbbbc0229f6ed
parent42b49397d2347b6a97394ce0b35efe5cc2ab44a2 (diff)
STORM-288 FIXED New name resets to old if change it on 'Item Profile' panel while fetching inventory
Reason: 'item info panel' updated EACH time some inventory object changed Fix: update 'item info panel' only if changed inventory object is the object for which 'item profile panel' is shown
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp23
-rw-r--r--indra/newview/llsidepaneliteminfo.h2
2 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index f9c0fd398e..be797ea937 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -68,10 +68,22 @@ private:
void LLItemPropertiesObserver::changed(U32 mask)
{
- // if there's a change we're interested in.
- if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0)
+ const std::set<LLUUID>& mChangedItemIDs = gInventory.getChangedIDs();
+ std::set<LLUUID>::const_iterator it;
+
+ const LLUUID& object_id = mFloater->getObjectID();
+
+ for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++)
{
- mFloater->dirty();
+ // set dirty for 'item profile panel' only if changed item is the item for which 'item profile panel' is shown (STORM-288)
+ if (*it == object_id)
+ {
+ // if there's a change we're interested in.
+ if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0)
+ {
+ mFloater->dirty();
+ }
+ }
}
}
@@ -179,6 +191,11 @@ void LLSidepanelItemInfo::setItemID(const LLUUID& item_id)
mItemID = item_id;
}
+const LLUUID& LLSidepanelItemInfo::getObjectID() const
+{
+ return mObjectID;
+}
+
void LLSidepanelItemInfo::reset()
{
LLSidepanelInventorySubpanel::reset();
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index 10e93dd7de..6416e2cfe4 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -54,6 +54,8 @@ public:
void setItemID(const LLUUID& item_id);
void setEditMode(BOOL edit);
+ const LLUUID& getObjectID() const;
+
protected:
/*virtual*/ void refresh();
/*virtual*/ void save();