diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-15 09:28:43 -0800 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-15 09:28:43 -0800 |
| commit | dde1d93ce46d4bbd313677ab597c8d2adffa1def (patch) | |
| tree | 10e4b69bff059cc96005974cbf2c5dd1af963d78 /indra/newview/llfloatergesture.cpp | |
| parent | eb560796faaac95609edb90b19b3e08299f730eb (diff) | |
| parent | b21fca13e6bea9420f80a35163d25a33b929bbd1 (diff) | |
PE merge.
Diffstat (limited to 'indra/newview/llfloatergesture.cpp')
| -rw-r--r-- | indra/newview/llfloatergesture.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 6a9c602db2..de65c6f876 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -110,7 +110,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key) mCommitCallbackRegistrar.add("Gesture.Action.ToogleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this)); - mCommitCallbackRegistrar.add("Gesture.Action.CopyPast", boost::bind(&LLFloaterGesture::onCopyPastAction, this, _2)); + mCommitCallbackRegistrar.add("Gesture.Action.CopyPaste", boost::bind(&LLFloaterGesture::onCopyPasteAction, this, _2)); mCommitCallbackRegistrar.add("Gesture.Action.SaveToCOF", boost::bind(&LLFloaterGesture::addToCurrentOutFit, this)); mEnableCallbackRegistrar.add("Gesture.EnableAction", boost::bind(&LLFloaterGesture::isActionEnabled, this, _2)); @@ -245,6 +245,7 @@ void LLFloaterGesture::refreshAll() void LLFloaterGesture::buildGestureList() { + S32 scroll_pos = mGestureList->getScrollPos(); std::vector<LLUUID> selected_items; getSelectedIds(selected_items); LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL; @@ -274,13 +275,14 @@ void LLFloaterGesture::buildGestureList() } } } + // attempt to preserve scroll position through re-builds - // since we do re-build any time anything dirties + // since we do re-build whenever something gets dirty for(std::vector<LLUUID>::iterator it = selected_items.begin(); it != selected_items.end(); it++) { mGestureList->selectByID(*it); } - mGestureList->scrollToShowSelected(); + mGestureList->setScrollPos(scroll_pos); } void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gesture,LLCtrlListInterface * list ) @@ -475,7 +477,7 @@ void LLFloaterGesture::onActivateBtnClick() } } -void LLFloaterGesture::onCopyPastAction(const LLSD& command) +void LLFloaterGesture::onCopyPasteAction(const LLSD& command) { std::string command_name = command.asString(); // since we select this comman inventory item had already arrived . |
