Comment 5 for bug 606245

Revision history for this message
Olivier Dufour (olivier-duff) wrote :

easy fix in selectTool.cs
iin OnMouseDown
- shape_origin = point;
+ // Selection is around the pixel selection so add 1 pixel
+ double x = Utility.Clamp (point.X, 0, doc.ImageSize.Width);
+ double y = Utility.Clamp (point.Y, 0, doc.ImageSize.Height);
+ shape_origin = new PointD (x, y);

OnMouseMove

- double x = Utility.Clamp (point.X, 0, doc.ImageSize.Width - 1);
- double y = Utility.Clamp (point.Y, 0, doc.ImageSize.Height - 1);
+ double x = Utility.Clamp (point.X, 0, doc.ImageSize.Width);
+ double y = Utility.Clamp (point.Y, 0, doc.ImageSize.Height);

because size an origin was miss clamped...