From 9a6a3e6a9099f9590f9253ab4dc9e259c1e427af Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 4 Nov 2014 11:55:20 +0100 Subject: [PATCH] Revert "commented outdated implementations of ClickableAt(int, int) and Contains(int, int)" This reverts commit 86d99a5a0dcbb1573ebdb4cb86529eb5b31ff099. The commit caused the TextContainer not to be normally selectable. --- Greenshot/Drawing/SpeechbubbleContainer.cs | 4 ++-- Greenshot/Drawing/TextContainer.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Greenshot/Drawing/SpeechbubbleContainer.cs b/Greenshot/Drawing/SpeechbubbleContainer.cs index 0791f3404..1ee2d3832 100644 --- a/Greenshot/Drawing/SpeechbubbleContainer.cs +++ b/Greenshot/Drawing/SpeechbubbleContainer.cs @@ -215,7 +215,7 @@ namespace Greenshot.Drawing { DrawText(graphics, rect, lineThickness, lineColor, false, StringFormat, Text, Font); } - /*public override bool Contains(int x, int y) { + public override bool Contains(int x, int y) { double xDistanceFromCenter = x - (Left + Width / 2); double yDistanceFromCenter = y - (Top + Height / 2); // ellipse: x^2/a^2 + y^2/b^2 = 1 @@ -246,6 +246,6 @@ namespace Greenshot.Drawing { } else { return false; } - }*/ + } } } diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs index dfe53fb84..b17e14665 100644 --- a/Greenshot/Drawing/TextContainer.cs +++ b/Greenshot/Drawing/TextContainer.cs @@ -404,10 +404,10 @@ namespace Greenshot.Drawing { } } - /*public override bool ClickableAt(int x, int y) { + public override bool ClickableAt(int x, int y) { Rectangle r = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); r.Inflate(5, 5); return r.Contains(x, y); - }*/ + } } }