summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-24 20:45:29 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-10-24 22:28:37 +0300
commit72ce0248f1669e3e172e38beeab96147d7eaea3b (patch)
tree99b413144fa5b304676ace74169854149292397f /indra
parentcbd594a663fee2099c938e12f6839446a0aaf341 (diff)
viewer#2753 "Animation to play" drop-down box stuck at None
Restore selection after regenerating list
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpreviewgesture.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 7cbbb89313..66dcd2f7ba 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -517,6 +517,7 @@ void LLPreviewGesture::addKeys()
void LLPreviewGesture::addAnimations()
{
LLComboBox* combo = mAnimationCombo;
+ LLUUID old_value = combo->getCurrentID();
combo->removeall();
@@ -565,6 +566,8 @@ void LLPreviewGesture::addAnimations()
combo->add(item->getName(), item->getAssetUUID(), ADD_BOTTOM);
}
+
+ combo->setCurrentByID(old_value);
}
@@ -1410,7 +1413,7 @@ void LLPreviewGesture::onCommitAnimation(LLUICtrl* ctrl, void* data)
{
// Assign the animation name
LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step;
- if (self->mAnimationCombo->getCurrentIndex() == 0)
+ if (self->mAnimationCombo->getCurrentIndex() <= 0)
{
anim_step->mAnimName.clear();
anim_step->mAnimAssetID.setNull();