summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 2be0aa40d2..ff95f8adce 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -427,7 +427,16 @@ void LLSideTray::createButtons ()
void LLSideTray::onTabButtonClick(string name)
{
-
+ LLSideTrayTab* side_bar = getTab(name);
+
+ if(side_bar == mActiveTab)
+ {
+ if(mCollapsed)
+ expandSideBar();
+ else
+ collapseSideBar();
+ return;
+ }
selectTabByName (name);
if(mCollapsed)
expandSideBar();
@@ -550,6 +559,15 @@ void LLSideTray::highlightFocused()
}
+BOOL LLSideTray::handleScrollWheel(S32 x, S32 y, S32 mask)
+{
+ BOOL ret = LLPanel::handleScrollWheel(x,y,mask);
+
+ if(!ret && childFromPoint(x,y) != 0 )
+ return TRUE;//mouse wheel over sidetray buttons, eat mouse wheel
+ return ret;
+}
+
//virtual
BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask)
{
@@ -632,7 +650,9 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
LLView* view = (*child_it)->findChildView(panel_name,true);
if(view)
{
- onTabButtonClick((*child_it)->getName());
+ selectTabByName ((*child_it)->getName());
+ if(mCollapsed)
+ expandSideBar();
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
if(container)