equal
deleted
inserted
replaced
548 } |
548 } |
549 |
549 |
550 TInt oldSelection = iCursorPos; |
550 TInt oldSelection = iCursorPos; |
551 TPoint hitPos = aPointerEvent.iPosition; |
551 TPoint hitPos = aPointerEvent.iPosition; |
552 |
552 |
553 // Convert XY position to linear cursor position |
553 // Convert XY position to linear cursor position |
554 hitPos -= iFirstCell.iTl; |
554 TPoint cellLeftTop( KTopLeft_x,KTopLeft_y ); |
|
555 hitPos -= cellLeftTop; |
|
556 |
555 TInt xPos = hitPos.iX / iCellWidth; |
557 TInt xPos = hitPos.iX / iCellWidth; |
556 TInt yPos = hitPos.iY / iCellHeight; |
558 TInt yPos = hitPos.iY / iCellHeight; |
557 TInt newSelection = yPos * iMaxColumns + xPos; |
559 TInt newSelection = yPos * iMaxColumns + xPos; |
558 |
560 |
559 // Check that the selection is inside the grid |
561 // Check that the selection is inside the grid |