Correction for the previous correction...

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2539 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-03-28 10:13:44 +00:00
commit 8a13a0d5a6

View file

@ -1436,9 +1436,17 @@ namespace Greenshot.Drawing {
int offsetY = 0; int offsetY = 0;
if (drawableContainerListBounds.Right > Bounds.Right) { if (drawableContainerListBounds.Right > Bounds.Right) {
offsetX = Bounds.Right - drawableContainerListBounds.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) { if (drawableContainerListBounds.Bottom > Bounds.Bottom) {
offsetY = Bounds.Bottom - drawableContainerListBounds.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); moveOffset = new Point(offsetX, offsetY);
} }