diff options
author | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
commit | b01c75cb423f07a3d3354f8bd62f265f80062b3b (patch) | |
tree | dec1b220c24a60cc220d1cb07fd3545610644f0a /indra/newview/llfloatergesture.cpp | |
parent | 868250bdd74f348557102c0d8408d9bec30331f6 (diff) |
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1
QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/newview/llfloatergesture.cpp')
-rw-r--r-- | indra/newview/llfloatergesture.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 658aa16429..6d39d75663 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -200,12 +200,7 @@ void LLFloaterGesture::refreshAll() } else { - if (list->setCurrentByID(sInstance->mSelectedID)) - { - LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("gesture_list"); - if (scroll) scroll->scrollToShowSelected(); - } - else + if (! list->setCurrentByID(sInstance->mSelectedID)) { list->selectFirstItem(); } @@ -219,8 +214,14 @@ void LLFloaterGesture::refreshAll() void LLFloaterGesture::buildGestureList() { LLCtrlListInterface *list = childGetListInterface("gesture_list"); - if (!list) return; + LLCtrlScrollInterface *scroll = childGetScrollInterface("gesture_list"); + if (! (list && scroll)) return; + + // attempt to preserve scroll position through re-builds + // since we do re-build any time anything dirties + S32 current_scroll_pos = scroll->getScrollPos(); + list->operateOnAll(LLCtrlListInterface::OP_DELETE); LLGestureManager::item_map_t::iterator it; @@ -319,6 +320,8 @@ void LLFloaterGesture::buildGestureList() } list->addElement(element, ADD_BOTTOM); } + + scroll->setScrollPos(current_scroll_pos); } // static |