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;
// FEATURE-995: Added a check for the current mouse cursor location, to paste the image on that location.
var mousePos = PointToClient(MousePosition);
if (Bounds.Contains(mousePos))
var mousePositionOnControl = PointToClient(MousePosition);
if (ClientRectangle.Contains(mousePositionOnControl))
{
x = mousePos.X;
y = mousePos.Y;
x = mousePositionOnControl.X;
y = mousePositionOnControl.Y;
}
foreach (Image clipboardImage in ClipboardHelper.GetImages(clipboard))