FEATURE-995: Fine tuning of the paste logic.

This commit is contained in:
Robin 2016-12-29 20:38:51 +01:00
commit fbba70fce4

View file

@ -1820,11 +1820,11 @@ namespace Greenshot.Drawing
int y = 10; int y = 10;
// FEATURE-995: Added a check for the current mouse cursor location, to paste the image on that location. // FEATURE-995: Added a check for the current mouse cursor location, to paste the image on that location.
var mousePos = PointToClient(MousePosition); var mousePositionOnControl = PointToClient(MousePosition);
if (Bounds.Contains(mousePos)) if (ClientRectangle.Contains(mousePositionOnControl))
{ {
x = mousePos.X; x = mousePositionOnControl.X;
y = mousePos.Y; y = mousePositionOnControl.Y;
} }
foreach (Image clipboardImage in ClipboardHelper.GetImages(clipboard)) foreach (Image clipboardImage in ClipboardHelper.GetImages(clipboard))