aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatercustomize.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:59 -0500
committerJacek Antonelli2008-08-15 23:44:59 -0500
commita408bac29378072fbf36864164149458c978cfcc (patch)
tree67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/newview/llfloatercustomize.cpp
parentSecond Life viewer sources 1.17.0.12 (diff)
downloadmeta-impy-a408bac29378072fbf36864164149458c978cfcc.zip
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz
Second Life viewer sources 1.17.1.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatercustomize.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp
index ee83bf9..62ead8f 100644
--- a/linden/indra/newview/llfloatercustomize.cpp
+++ b/linden/indra/newview/llfloatercustomize.cpp
@@ -422,6 +422,8 @@ public:
422 static void onTextureCommit( LLUICtrl* ctrl, void* userdata ); 422 static void onTextureCommit( LLUICtrl* ctrl, void* userdata );
423 static void onColorCommit( LLUICtrl* ctrl, void* userdata ); 423 static void onColorCommit( LLUICtrl* ctrl, void* userdata );
424 static void onCommitSexChange( LLUICtrl*, void* userdata ); 424 static void onCommitSexChange( LLUICtrl*, void* userdata );
425 static void onSelectAutoWearOption(S32 option, void* data);
426
425 427
426 428
427private: 429private:
@@ -662,6 +664,11 @@ void LLPanelEditWearable::onBtnRevert( void* userdata )
662void LLPanelEditWearable::onBtnCreateNew( void* userdata ) 664void LLPanelEditWearable::onBtnCreateNew( void* userdata )
663{ 665{
664 LLPanelEditWearable* self = (LLPanelEditWearable*) userdata; 666 LLPanelEditWearable* self = (LLPanelEditWearable*) userdata;
667 gViewerWindow->alertXml("AutoWearNewClothing", onSelectAutoWearOption, self);
668}
669void LLPanelEditWearable::onSelectAutoWearOption(S32 option, void* data)
670{
671 LLPanelEditWearable* self = (LLPanelEditWearable*) data;
665 LLVOAvatar* avatar = gAgent.getAvatarObject(); 672 LLVOAvatar* avatar = gAgent.getAvatarObject();
666 if(avatar) 673 if(avatar)
667 { 674 {
@@ -673,14 +680,15 @@ void LLPanelEditWearable::onBtnCreateNew( void* userdata )
673 // regular UI, items get created in normal folder 680 // regular UI, items get created in normal folder
674 folder_id = gInventory.findCategoryUUIDForType(asset_type); 681 folder_id = gInventory.findCategoryUUIDForType(asset_type);
675 682
676 LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback; 683 // Only auto wear the new item if the AutoWearNewClothing checkbox is selected.
684 LLPointer<LLInventoryCallback> cb = option == 0 ?
685 new WearOnAvatarCallback : NULL;
677 create_inventory_item(gAgent.getID(), gAgent.getSessionID(), 686 create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
678 folder_id, wearable->getTransactionID(), wearable->getName(), wearable->getDescription(), 687 folder_id, wearable->getTransactionID(), wearable->getName(), wearable->getDescription(),
679 asset_type, LLInventoryType::IT_WEARABLE, wearable->getType(), 688 asset_type, LLInventoryType::IT_WEARABLE, wearable->getType(),
680 wearable->getPermissions().getMaskNextOwner(), cb); 689 wearable->getPermissions().getMaskNextOwner(), cb);
681 } 690 }
682} 691}
683
684void LLPanelEditWearable::addColorSwatch( LLVOAvatar::ETextureIndex te, const LLString& name ) 692void LLPanelEditWearable::addColorSwatch( LLVOAvatar::ETextureIndex te, const LLString& name )
685{ 693{
686 childSetCommitCallback(name, LLPanelEditWearable::onColorCommit, this); 694 childSetCommitCallback(name, LLPanelEditWearable::onColorCommit, this);