viewer#1005 Review fixes

master
Andrey Kleshchev 2024-06-26 14:48:02 +03:00
parent 7ae63daff1
commit 6ee6d19f60
6 changed files with 14 additions and 28 deletions

View File

@ -2042,7 +2042,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
}
// Moved from LLWearableList::ContextMenu for wider utility.
bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismarch) const
bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismatch) const
{
// TODO: investigate wearables may not be loaded at this point EXT-8231
@ -2072,7 +2072,7 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_t
}
else
{
if (warn_on_type_mismarch)
if (warn_on_type_mismatch)
{
LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
}

View File

@ -102,7 +102,7 @@ public:
bool getCanReplaceCOF(const LLUUID& outfit_cat_id);
// Can we add all referenced items to the avatar?
bool canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismarch = true) const;
bool canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismatch = true) const;
// Copy all items in a category.
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,

View File

@ -29,6 +29,7 @@
#include "llfloaterinventorysettings.h"
#include "llcolorswatch.h"
#include "llviewercontrol.h"
LLFloaterInventorySettings::LLFloaterInventorySettings(const LLSD& key)
: LLFloater(key)
@ -43,13 +44,17 @@ LLFloaterInventorySettings::~LLFloaterInventorySettings()
BOOL LLFloaterInventorySettings::postBuild()
{
getChild<LLUICtrl>("favorites_color")->setCommitCallback(boost::bind(&LLFloaterInventorySettings::updateColorSwatch, this));
bool enable_color = gSavedSettings.getBOOL("InventoryFavoritesColorText");
getChild<LLUICtrl>("favorites_swatch")->setEnabled(enable_color);
return TRUE;
}
void LLFloaterInventorySettings::updateColorSwatch()
{
bool val = getChild<LLUICtrl>("favorites_color")->getEnabled();
getChild<LLUICtrl>("favorites_color")->setEnabled(val);
bool val = getChild<LLUICtrl>("favorites_color")->getValue();
getChild<LLUICtrl>("favorites_swatch")->setEnabled(val);
}
void LLFloaterInventorySettings::applyUIColor(LLUICtrl* ctrl, const LLSD& param)

View File

@ -2514,12 +2514,12 @@ void set_favorite(const LLUUID& obj_id, bool favorite)
if (obj && obj->getIsLinkType())
{
obj = gInventory.getObject(obj_id);
obj = gInventory.getObject(obj->getLinkedUUID());
}
if (obj && obj->getIsFavorite() != favorite)
{
favorite_send(obj, obj_id, favorite);
favorite_send(obj, obj->getUUID(), favorite);
}
}
@ -2528,12 +2528,12 @@ void toggle_favorite(const LLUUID& obj_id)
LLInventoryObject* obj = gInventory.getObject(obj_id);
if (obj && obj->getIsLinkType())
{
obj = gInventory.getObject(obj_id);
obj = gInventory.getObject(obj->getLinkedUUID());
}
if (obj)
{
favorite_send(obj, obj_id, !obj->getIsFavorite());
favorite_send(obj, obj->getUUID(), !obj->getIsFavorite());
}
}

View File

@ -331,9 +331,6 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFavoritesCollector
//
// Simple class that collects calling cards that are not null, and not
// the agent. Duplicates are possible.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFavoritesCollector : public LLInventoryCollectFunctor
{

View File

@ -125,22 +125,6 @@
function="Inventory.DoToSelected"
parameter="thumbnail" />
</menu_item_call>
<menu_item_call
label="Add to favorites"
layout="topleft"
name="favorites_add">
<menu_item_call.on_click
function="Inventory.DoToSelected"
parameter="favorite" />
</menu_item_call>
<menu_item_call
label="Remove from favorites"
layout="topleft"
name="favorites_remove">
<menu_item_call.on_click
function="Inventory.DoToSelected"
parameter="favorite" />
</menu_item_call>
<menu_item_call
label="Copy Asset UUID"
layout="topleft"