aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-12 02:59:00 -0700
committerMcCabe Maxsted2009-06-12 02:59:00 -0700
commite0cf129601f7b42f5c20f63a9651edb6a0293f9e (patch)
treedf598e0562a0b55a6c67cbc809d19aab040d1373 /linden/indra/newview/llinventorybridge.cpp
parentMerged in 1.2.0-linkintools (diff)
downloadmeta-impy-e0cf129601f7b42f5c20f63a9651edb6a0293f9e.zip
meta-impy-e0cf129601f7b42f5c20f63a9651edb6a0293f9e.tar.gz
meta-impy-e0cf129601f7b42f5c20f63a9651edb6a0293f9e.tar.bz2
meta-impy-e0cf129601f7b42f5c20f63a9651edb6a0293f9e.tar.xz
Double clicking inventory objects toggles wear/detach. Patch originally by Nicholaz Beresford with additions by Henri Beauchamp
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index 697b30b..52b15cb 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -3304,10 +3304,19 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
3304 3304
3305void LLObjectBridge::openItem() 3305void LLObjectBridge::openItem()
3306{ 3306{
3307 /* Disabled -- this preview isn't useful. JC */ 3307 LLVOAvatar* avatar = gAgent.getAvatarObject();
3308 // CP: actually, this code is required - made changes to match LLAnimationBridge::openItem() idiom 3308 if (!avatar)
3309 // The properties preview is useful, converting to show object properties. - DaveP 3309 {
3310 LLShowProps::showProperties(mUUID); 3310 return;
3311 }
3312 if (avatar->isWearingAttachment(mUUID))
3313 {
3314 performAction(NULL, NULL, "detach");
3315 }
3316 else
3317 {
3318 performAction(NULL, NULL, "attach");
3319 }
3311} 3320}
3312 3321
3313LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const 3322LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
@@ -4358,9 +4367,13 @@ void LLWearableBridge::openItem()
4358 } 4367 }
4359 else if(isAgentInventory()) 4368 else if(isAgentInventory())
4360 { 4369 {
4361 if( !gAgent.isWearingItem( mUUID ) ) 4370 if (gAgent.isWearingItem(mUUID))
4362 { 4371 {
4363 wearOnAvatar(); 4372 performAction(NULL, NULL, "take_off");
4373 }
4374 else
4375 {
4376 performAction(NULL, NULL, "wear");
4364 } 4377 }
4365 } 4378 }
4366 else 4379 else