summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpicks.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-08 13:33:21 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-08 13:33:21 -0500
commit37848d29d9030e00086c3a499d28237cdf943e1b (patch)
treed4af1d371cf94a1970f9449b1adc8ba29e86bb9d /indra/newview/llpanelpicks.cpp
parent51a196416d9bde106ae0cb3cfd77003a68a6265b (diff)
parente07ef0d0e0e8cbd58afd4c6ee970634bd2f783e7 (diff)
automated merge viewer2.0->avp
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rw-r--r--indra/newview/llpanelpicks.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index cc6e88a9d2..59a68bc12d 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -161,6 +161,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
std::string name, second_name;
gCacheName->getName(getAvatarId(),name,second_name);
childSetTextArg("pick_title", "[NAME]",name);
+
+ // Save selection, to be able to edit same item after saving changes. See EXT-3023.
+ LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID];
mPicksList->clear();
@@ -186,6 +189,10 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mPicksList->addItem(picture, pick_value);
+ // Restore selection by item id.
+ if ( pick_id == selected_id )
+ mPicksList->selectItemByValue(pick_value);
+
picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickPickItem, this, _1));
picture->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));