From 8a13a0d5a6d52b90849a9c75960f9289dfe92f63 Mon Sep 17 00:00:00 2001 From: RKrom Date: Thu, 28 Mar 2013 10:13:44 +0000 Subject: [PATCH] Correction for the previous correction... git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2539 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Drawing/Surface.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs index 08caad5ff..38f3dea32 100644 --- a/Greenshot/Drawing/Surface.cs +++ b/Greenshot/Drawing/Surface.cs @@ -1436,9 +1436,17 @@ namespace Greenshot.Drawing { int offsetY = 0; if (drawableContainerListBounds.Right > Bounds.Right) { offsetX = Bounds.Right - drawableContainerListBounds.Right; + // Correction for the correction + if (drawableContainerListBounds.Left + offsetX < 0) { + offsetX += Math.Abs(drawableContainerListBounds.Left + offsetX); + } } if (drawableContainerListBounds.Bottom > Bounds.Bottom) { offsetY = Bounds.Bottom - drawableContainerListBounds.Bottom; + // Correction for the correction + if (drawableContainerListBounds.Top + offsetY < 0) { + offsetY += Math.Abs(drawableContainerListBounds.Top + offsetY); + } } moveOffset = new Point(offsetX, offsetY); }