Fix bug that would cause tabbuttons to be positioned incorrectly when scrolling with the mouse wheel

This commit is contained in:
Kenny Shields 2014-05-26 00:54:15 -04:00
parent 1764333ae4
commit 0472742468

View File

@ -239,9 +239,6 @@ function newobject:mousepressed(x, y, button)
local visible = internals[numinternals]:GetVisible()
if col and visible then
local bwidth = self:GetWidthOfButtons()
if (self.offsetx + bwidth) < self.width then
self.offsetx = bwidth - self.width
else
local scrollamount = self.mousewheelscrollamount
local dtscrolling = self.dtscrolling
if dtscrolling then
@ -250,6 +247,8 @@ function newobject:mousepressed(x, y, button)
else
self.offsetx = self.offsetx - scrollamount
end
if ((self.offsetx + bwidth) + self.width) < self.width then
self.offsetx = -(bwidth + 10)
end
end
end