From db56afd656fe978e0a67a29f67bd8434141ffcaa Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Mon, 1 Nov 2010 15:12:14 +0200 Subject: 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 --- indra/newview/llsidepaneliteminfo.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') 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& mChangedItemIDs = gInventory.getChangedIDs(); + std::set::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(); -- cgit v1.2.3 From bd53ba004a522d7c0448cdbf2b5f35b6aebd8397 Mon Sep 17 00:00:00 2001 From: Wolfpup Lowenhar Date: Wed, 15 Dec 2010 09:53:24 -0500 Subject: STORM-776 : unable to change permissions to "no trans" on item in avatar inventory applied Kitty's code changes listed in STROM-288 as it is a related issue and this actualy fixed both issues! --- indra/newview/llsidepaneliteminfo.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index be797ea937..c8c6858b81 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -71,12 +71,12 @@ void LLItemPropertiesObserver::changed(U32 mask) const std::set& mChangedItemIDs = gInventory.getChangedIDs(); std::set::const_iterator it; - const LLUUID& object_id = mFloater->getObjectID(); + const LLUUID& item_id = mFloater->getItemID(); for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++) { // 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 (*it == item_id) { // if there's a change we're interested in. if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0) @@ -196,6 +196,11 @@ const LLUUID& LLSidepanelItemInfo::getObjectID() const return mObjectID; } +const LLUUID& LLSidepanelItemInfo::getItemID() const +{ + return mItemID; +} + void LLSidepanelItemInfo::reset() { LLSidepanelInventorySubpanel::reset(); -- cgit v1.2.3