Proper fix for FIRE-9465: correctly clamp scroll values so tabs cant be moved around via scrolling when they should be able to.

Liny 2013-03-15 13:23:45 -07:00
parent 1af7071080
commit eb7bf3ed4f
1 changed files with 2 additions and 2 deletions

View File

@ -874,11 +874,11 @@ BOOL LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if(clicks < 0)
{
setScrollPos(getScrollPos() - 1);
setScrollPos(llmax(0, getScrollPos()-1));
}
else
{
setScrollPos(getScrollPos() + 1);
setScrollPos(llmin(getScrollPos()+1, getMaxScrollPos()));
}
}