From 72ce0248f1669e3e172e38beeab96147d7eaea3b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 24 Oct 2024 20:45:29 +0300 Subject: viewer#2753 "Animation to play" drop-down box stuck at None Restore selection after regenerating list --- indra/newview/llpreviewgesture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') 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(); -- cgit v1.2.3