From 995453625cf794660b1a07c3fc57579b4bb8b442 Mon Sep 17 00:00:00 2001 From: rafak360 <38642526+rafak360@users.noreply.github.com> Date: Tue, 31 Dec 2024 22:49:59 -0300 Subject: [PATCH] Update ao.cpp --- indra/newview/ao.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index d398c73afe..92c9c813e7 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -203,6 +203,16 @@ void FloaterAO::updateList() } } +void FloaterAO::updateScrollListData() +{ + auto animationListData = mAnimationList->getAllData(); + for (auto index = 0; index < mSelectedState->mAnimations.size(); ++index) + { + LLScrollListItem* item = animationListData[index]; + item->setUserdata(&mSelectedState->mAnimations[index].mInventoryUUID); + } +} + bool FloaterAO::postBuild() { LLPanel* aoPanel = getChild("animation_overrider_outer_panel"); @@ -674,6 +684,7 @@ void FloaterAO::onClickMoveUp() if (AOEngine::instance().swapWithPrevious(mSelectedState, currentIndex)) { mAnimationList->swapWithPrevious(currentIndex); + updateScrollListData(); } } @@ -699,6 +710,7 @@ void FloaterAO::onClickMoveDown() if (AOEngine::instance().swapWithNext(mSelectedState, currentIndex)) { mAnimationList->swapWithNext(currentIndex); + updateScrollListData(); } }