Correct position of context menus in scrolling panels, fixes #135

This commit is contained in:
Simon Robertshaw 2012-08-20 12:54:48 +01:00
parent 43ed72b4c5
commit 9ecc29d24c

View File

@ -162,7 +162,7 @@ Point Component::GetScreenPos()
if(GetParentWindow()) if(GetParentWindow())
newPos += GetParentWindow()->Position; newPos += GetParentWindow()->Position;
if(GetParent()) if(GetParent())
newPos += GetParent()->Position; newPos += GetParent()->Position + GetParent()->ViewportPosition;
newPos += Position; newPos += Position;
return newPos; return newPos;
} }