Update ao.cpp

master
rafak360 2024-12-31 22:49:59 -03:00 committed by GitHub
parent d42881d616
commit 995453625c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -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<LLPanel>("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();
}
}