Satisfy Issue 167: Ability to set global "add instead of wear" option in prefs

Adds debug setting LiruAddNotReplace.
Adds "Add clothing and wearables instead of replacing them" to Main (General) tab of Vanity Preferences.
This commit is contained in:
Inusaito Sayori
2012-12-17 17:17:12 -05:00
parent 36a698fee4
commit 9e8dafc4ca
5 changed files with 19 additions and 2 deletions

View File

@@ -5347,9 +5347,10 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)
void LLObjectBridge::openItem()
{
static LLCachedControl<bool> add(gSavedSettings, "LiruAddNotReplace");
// object double-click action is to wear/unwear object
performAction(getInventoryModel(),
get_is_item_worn(mUUID) ? "detach" : "attach");
get_is_item_worn(mUUID) ? "detach" : (add ? "wear_add" : "attach"));
}
std::string LLObjectBridge::getLabelSuffix() const
@@ -6803,10 +6804,11 @@ void LLWearableBridgeAction::wearOnAvatar()
{
// TODO: investigate wearables may not be loaded at this point EXT-8231
static LLCachedControl<bool> add(gSavedSettings, "LiruAddNotReplace");
LLViewerInventoryItem* item = getItem();
if(item)
{
LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true);
LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, !add);
}
}