summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-05-20 10:49:15 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-05-20 10:49:15 +0300
commit56e88c6b2e656a28b25154e27c05e7ced65d90a8 (patch)
tree3ee0680cb64b0bbdad6d40e2ae0c09dc289a3c70
parent1e48e25558e657d82f711578e54304c745fa9347 (diff)
EXT-7367 FIX - eat sroll wheel above gesture popup list
reviwed by Mike Antipov at https://codereview.productengine.com/secondlife/r/411 --HG-- branch : product-engine
-rw-r--r--indra/newview/llnearbychatbar.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index bd504906d5..7a525596a0 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -69,6 +69,25 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
{ "/shout" , CHAT_TYPE_SHOUT}
};
+//ext-7367
+//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message.
+// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages)
+class LLGestureScrollListCtrl: public LLScrollListCtrl
+{
+protected:
+ friend class LLUICtrlFactory;
+ LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params)
+ :LLScrollListCtrl(params)
+ {
+ }
+public:
+ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks)
+ {
+ LLScrollListCtrl::handleScrollWheel( x, y, clicks );
+ return TRUE;
+ }
+};
+
LLGestureComboList::Params::Params()
: combo_button("combo_button"),
combo_list("combo_list")
@@ -90,13 +109,14 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
addChild(mButton);
- LLScrollListCtrl::Params params = p.combo_list;
+ LLGestureScrollListCtrl::Params params(p.combo_list);
+
params.name("GestureComboList");
params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2));
params.visible(false);
params.commit_on_keyboard_movement(false);
- mList = LLUICtrlFactory::create<LLScrollListCtrl>(params);
+ mList = LLUICtrlFactory::create<LLGestureScrollListCtrl>(params);
addChild(mList);
//****************************Gesture Part********************************/