diff options
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index e41bbe43df..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(); + } + } } } @@ -122,8 +134,6 @@ LLSidepanelItemInfo::LLSidepanelItemInfo() , mObjectInventoryObserver(NULL) { mPropertiesObserver = new LLItemPropertiesObserver(this); - - //LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); } // Destroys the object @@ -181,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(); @@ -317,11 +332,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (item->getCreatorUUID().notNull()) { - std::string name; - gCacheName->getFullName(item->getCreatorUUID(), name); + LLUUID creator_id = item->getCreatorUUID(); + std::string name = + LLSLURL("agent", creator_id, "completename").getSLURLString(); getChildView("BtnCreator")->setEnabled(TRUE); getChildView("LabelCreatorTitle")->setEnabled(TRUE); - getChildView("LabelCreatorName")->setEnabled(TRUE); + getChildView("LabelCreatorName")->setEnabled(FALSE); getChild<LLUICtrl>("LabelCreatorName")->setValue(name); } else @@ -344,11 +360,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } else { - gCacheName->getFullName(perm.getOwner(), name); + LLUUID owner_id = perm.getOwner(); + name = LLSLURL("agent", owner_id, "completename").getSLURLString(); } getChildView("BtnOwner")->setEnabled(TRUE); getChildView("LabelOwnerTitle")->setEnabled(TRUE); - getChildView("LabelOwnerName")->setEnabled(TRUE); + getChildView("LabelOwnerName")->setEnabled(FALSE); getChild<LLUICtrl>("LabelOwnerName")->setValue(name); } else |