View | Details | Raw Unified | Return to bug 2787
Collapse All | Expand All

(-)a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs (-12 / +11 lines)
Lines 464-485 namespace System.Windows.Forms Link Here
464
		{
464
		{
465
			if (!Enabled) return;
465
			if (!Enabled) return;
466
466
467
			base.OnMouseUp (e);
467
			if (active_link != null && this.Capture && ((e.Button & MouseButtons.Left) != 0)) {
468
				this.Capture = false;
469
				Link clicked_link = (PointInLink (e.X, e.Y) == active_link) ? active_link : null;
468
470
469
			if (active_link == null)
471
				active_link.Active = false;
470
				return;
472
				active_link = null;
471
472
			Link clicked_link = (PointInLink (e.X, e.Y) == active_link) ? active_link : null;
473
474
			active_link.Active = false;
475
			active_link = null;
476
473
477
			if (clicked_link != null)
474
				if (clicked_link != null)
478
#if NET_2_0
475
#if NET_2_0
479
				OnLinkClicked (new LinkLabelLinkClickedEventArgs (clicked_link, e.Button));
476
					OnLinkClicked (new LinkLabelLinkClickedEventArgs (clicked_link, e.Button));
480
#else
477
#else
481
				OnLinkClicked (new LinkLabelLinkClickedEventArgs (clicked_link));
478
					OnLinkClicked (new LinkLabelLinkClickedEventArgs (clicked_link));
482
#endif
479
#endif
480
			}
481
482
			base.OnMouseUp(e);
483
		}
483
		}
484
484
485
		protected override void OnPaint (PaintEventArgs e)
485
		protected override void OnPaint (PaintEventArgs e)
486
- 

Return to bug 2787