[gbrainy] Fixes #612273



commit 8f8664ee726a07dc0d1d917e9b6dfb20fabe2e22
Author: Jordi Mas <jmas softcatala org>
Date:   Tue Mar 9 19:41:13 2010 +0100

    Fixes #612273

 src/Clients/Classical/gbrainy.cs |    4 ++--
 src/Core/Main/IMouseEvent.cs     |    1 +
 src/Core/Toolkit/DrawableArea.cs |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Clients/Classical/gbrainy.cs b/src/Clients/Classical/gbrainy.cs
index b67c8d6..2f3d382 100644
--- a/src/Clients/Classical/gbrainy.cs
+++ b/src/Clients/Classical/gbrainy.cs
@@ -195,10 +195,10 @@ namespace gbrainy.Clients.Classical
 
 		void OnHandleButtonPress (object o, ButtonPressEventArgs ev_args)
 		{
-			if (ev_args.Event.Type != EventType.TwoButtonPress)
+			if (ev_args.Event.Type != EventType.ButtonPress)
 				return;
 
-			SendMouseEvent (ev_args.Event.X, ev_args.Event.Y, MouseEventType.DoubleClick);
+			SendMouseEvent (ev_args.Event.X, ev_args.Event.Y, MouseEventType.ButtonPress);
 		}
 
 		void SendMouseEvent (double ev_x, double ev_y, MouseEventType type)
diff --git a/src/Core/Main/IMouseEvent.cs b/src/Core/Main/IMouseEvent.cs
index 1e72965..ebd0bad 100644
--- a/src/Core/Main/IMouseEvent.cs
+++ b/src/Core/Main/IMouseEvent.cs
@@ -27,6 +27,7 @@ namespace gbrainy.Core.Main
 	public enum MouseEventType
 	{
 		Move,
+		ButtonPress,
 		DoubleClick,
 	};
 
diff --git a/src/Core/Toolkit/DrawableArea.cs b/src/Core/Toolkit/DrawableArea.cs
index 1c3594b..7533cd8 100644
--- a/src/Core/Toolkit/DrawableArea.cs
+++ b/src/Core/Toolkit/DrawableArea.cs
@@ -99,7 +99,7 @@ namespace gbrainy.Core.Toolkit
 				}
 			} else {
 
-				if (args.EventType == MouseEventType.DoubleClick) {
+				if (args.EventType == MouseEventType.ButtonPress) {
 					OnSelected (new SeletectedEventArgs (Data, DataEx));
 				} else {
 					if (hoover == false) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]