diff options
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index a4cb6ea65d..43d4edb069 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -636,7 +636,7 @@ void LLInventoryGallery::removeFromLastRow(LLInventoryGalleryItem* item) mItemPanels.pop_back(); } -LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn, bool is_favorite) +LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn) { LLInventoryGalleryItem::Params giparams; giparams.visible = true; @@ -647,7 +647,6 @@ LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, L gitem->setUUID(item_id); gitem->setGallery(this); gitem->setType(type, inventory_type, flags, is_link); - gitem->setFavorite(is_favorite); gitem->setLoadImmediately(mLoadThumbnailsImmediately); gitem->setThumbnail(thumbnail_id); gitem->setWorn(is_worn); @@ -940,19 +939,8 @@ bool LLInventoryGallery::updateAddedItem(LLUUID item_id) } bool res = false; - bool is_favorite = get_is_favorite(obj); - - LLInventoryGalleryItem* item = buildGalleryItem( - name, - item_id, - obj->getType(), - thumbnail_id, - inventory_type, - misc_flags, - obj->getCreationDate(), - obj->getIsLinkType(), - is_worn, - is_favorite); + + LLInventoryGalleryItem* item = buildGalleryItem(name, item_id, obj->getType(), thumbnail_id, inventory_type, misc_flags, obj->getCreationDate(), obj->getIsLinkType(), is_worn); mItemMap.insert(LLInventoryGallery::gallery_item_map_t::value_type(item_id, item)); if (mGalleryCreated) { @@ -989,7 +977,7 @@ void LLInventoryGallery::updateRemovedItem(LLUUID item_id) mItemBuildQuery.erase(item_id); } -void LLInventoryGallery::updateChangedItemData(LLUUID item_id, std::string name, bool is_favorite) +void LLInventoryGallery::updateChangedItemName(LLUUID item_id, std::string name) { gallery_item_map_t::iterator iter = mItemMap.find(item_id); if (iter != mItemMap.end()) @@ -998,7 +986,6 @@ void LLInventoryGallery::updateChangedItemData(LLUUID item_id, std::string name, if (item) { item->setItemName(name); - item->setFavorite(is_favorite); } } } @@ -2014,7 +2001,7 @@ void LLInventoryGallery::deleteSelection() for (LLInventoryModel::item_array_t::value_type& item : items) { - if (!item->getIsLinkType() && get_is_item_worn(item)) + if (get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); @@ -2035,7 +2022,7 @@ void LLInventoryGallery::deleteSelection() } LLViewerInventoryItem* item = gInventory.getItem(id); - if (item && !item->getIsLinkType() && get_is_item_worn(item)) + if (item && get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); @@ -2348,7 +2335,7 @@ void LLInventoryGallery::refreshList(const LLUUID& category_id) return; } - updateChangedItemData(*items_iter, obj->getName(), get_is_favorite(obj)); + updateChangedItemName(*items_iter, obj->getName()); mNeedsArrange = true; } @@ -2864,14 +2851,6 @@ void LLInventoryGalleryItem::setType(LLAssetType::EType type, LLInventoryType::E getChild<LLIconCtrl>("link_overlay")->setVisible(is_link); } -void LLInventoryGalleryItem::setFavorite(bool is_favorite) -{ - getChild<LLIconCtrl>("fav_icon")->setVisible(is_favorite); - static const LLUIColor text_color = LLUIColorTable::instance().getColor("LabelTextColor", LLColor4::white); - static const LLUIColor favorite_color = LLUIColorTable::instance().getColor("InventoryFavoriteColor", LLColor4::white); - mNameText->setReadOnlyColor(is_favorite ? favorite_color : text_color); -} - void LLInventoryGalleryItem::setThumbnail(LLUUID id) { mDefaultImage = id.isNull(); |