Permalink
Browse files

Fixed coordinate system transform to views

  • Loading branch information...
1 parent 4caa1cb commit 5199eb0f9c271f7d53d93a162905d681c8a8eccb Jonathan Dann committed Nov 1, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 Framework/Views/OpenGL/KTOpenGLLayer.m
@@ -285,13 +285,13 @@ - (NSPoint)convertPointToViewPoint:(NSPoint)thePoint
{
NSPoint aPointToReturn = thePoint;
// go up the layer tree until we find the view - we will adjust our coordinates for each layer
- KTOpenGLLayer * aLayer = self;
- while(aLayer != nil)
+ KTOpenGLLayer * aSuperLayer = [self superlayer];
+ while(aSuperLayer != nil)
{
- NSRect aLayerFrame = [aLayer frame];
+ NSRect aLayerFrame = [aSuperLayer frame];
aPointToReturn.x+=aLayerFrame.origin.x;
aPointToReturn.y+=aLayerFrame.origin.y;
- aLayer = [aLayer superlayer];
+ aSuperLayer = [aSuperLayer superlayer];
}
return aPointToReturn;
}

0 comments on commit 5199eb0

Please sign in to comment.