summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-03-02 16:26:30 +0200
committerMike Antipov <mantipov@productengine.com>2010-03-02 16:26:30 +0200
commitca37311987f038a153030a45da503d2162a18be6 (patch)
tree707d0b4403a5a8d7bff3459a9b5250821ad1533c /indra
parentbe1739c5d584495c3cd946fd3e156d4b2ac0a2b2 (diff)
Fixed major bug EXT-3981 ([BSI] scroll bar resets to near the top of inventory search)
- disabled auto scrolling in inventory panels when mouse pointer is over the panel --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfolderview.cpp3
-rw-r--r--indra/newview/llfolderview.h2
-rw-r--r--indra/newview/llinventorypanel.cpp15
-rw-r--r--indra/newview/llinventorypanel.h4
4 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 23f19a38a6..f7fd7bb472 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -179,6 +179,7 @@ LLFolderView::LLFolderView(const Params& p)
mSourceID(p.task_id),
mRenameItem( NULL ),
mNeedsScroll( FALSE ),
+ mEnableScroll( true ),
mPinningSelectedItem(FALSE),
mNeedsAutoSelect( FALSE ),
mAutoSelectOverride(FALSE),
@@ -1913,7 +1914,7 @@ void LLFolderView::deleteAllChildren()
void LLFolderView::scrollToShowSelection()
{
- if (mSelectedItems.size())
+ if (mEnableScroll && mSelectedItems.size())
{
mNeedsScroll = TRUE;
}
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index faf6a9cf23..38255b3cea 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -269,6 +269,7 @@ public:
void dumpSelectionInformation();
virtual S32 notify(const LLSD& info) ;
+ void setEnableScroll(bool enable_scroll) { mEnableScroll = enable_scroll; }
private:
void updateRenamerPosition();
@@ -300,6 +301,7 @@ protected:
LLLineEditor* mRenamer;
BOOL mNeedsScroll;
+ bool mEnableScroll;
BOOL mPinningSelectedItem;
LLRect mScrollConstraintRect;
BOOL mNeedsAutoSelect;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 048ed10886..8097985ade 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -681,6 +681,21 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return handled;
}
+// virtual
+void LLInventoryPanel::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ LLPanel::onMouseEnter(x, y, mask);
+ // don't auto-scroll a list when cursor is over Inventory. See EXT-3981.
+ mFolders->setEnableScroll(false);
+}
+
+// virtual
+void LLInventoryPanel::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ LLPanel::onMouseLeave(x, y, mask);
+ mFolders->setEnableScroll(true);
+}
+
void LLInventoryPanel::onFocusLost()
{
// inventory no longer handles cut/copy/paste/delete
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index f312b588b9..37b03dbd7d 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -122,6 +122,10 @@ public:
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
+
+ void onMouseEnter(S32 x, S32 y, MASK mask);
+ void onMouseLeave(S32 x, S32 y, MASK mask);
+
// LLUICtrl methods
/*virtual*/ void onFocusLost();
/*virtual*/ void onFocusReceived();