diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2012-01-11 23:03:40 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2012-01-11 23:06:32 +0400 |
commit | b521d65957699b475e782e2e9ca451331f2a0264 (patch) | |
tree | 1c94fd094b564796bf4b789e01b3b8849677bcfb /Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs | |
parent | 804b4f6fa519267ad9c38165b0f89b200b69c8b8 (diff) |
Don't fire the click event when changing the Active property.
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs')
-rwxr-xr-x | Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs index b8e3a728..caef5967 100755 --- a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs @@ -32,6 +32,8 @@ namespace Xwt.GtkBackend { public class ButtonBackend: WidgetBackend, IButtonBackend { + protected bool ignoreClickEvents; + public ButtonBackend () { } @@ -152,9 +154,11 @@ namespace Xwt.GtkBackend void HandleWidgetClicked (object sender, EventArgs e) { - Toolkit.Invoke (delegate { - EventSink.OnClicked (); - }); + if (!ignoreClickEvents) { + Toolkit.Invoke (delegate { + EventSink.OnClicked (); + }); + } } } } |