Skip to content

Commit

Permalink
Fixed a drag issue when the view of the clicked cell is in a flipped …
Browse files Browse the repository at this point in the history
…coordinate system.
  • Loading branch information
nonamelive committed Mar 4, 2011
1 parent b487f31 commit d4f652d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/PXListView.m
Expand Up @@ -779,6 +779,11 @@ -(NSImage*) dragImageForRowsWithIndexes: (NSIndexSet *)dragRows event: (NSEvent*
CGFloat minX = CGFLOAT_MAX, maxX = CGFLOAT_MIN,
minY = CGFLOAT_MAX, maxY = CGFLOAT_MIN;
NSPoint localMouse = [self convertPoint: NSZeroPoint fromView: clickedCell];

if ([clickedCell isFlipped]) {
localMouse = [self convertPoint:CGPointMake(0, NSHeight(clickedCell.frame) * 2) fromView:clickedCell];
}

localMouse.y += [self documentVisibleRect].origin.y;

// Determine how large an image we'll need to hold all cells, with their
Expand Down

0 comments on commit d4f652d

Please sign in to comment.