internal void SetAngle(float a, AngleChangedArgs.MouseState mouseState) { float a2 = (Cc != null) ? Cc.AdjustAngle(a) : a; float a3 = a2; if ((snapMode == SnapMode.SnapOnMouseUp && (mouseState == AngleChangedArgs.MouseState.Up || mouseState == AngleChangedArgs.MouseState.Unknown)) || snapMode == SnapMode.SnapAlways) { a3 = CalcSnapAngle(a2); } else { a3 = a2; } // Version 1.2.3 - June 14, 2015 // - added checks for mouseState if (a3 != angle || mouseState == AngleChangedArgs.MouseState.Up || mouseState == AngleChangedArgs.MouseState.Down) { float change = a3 - angle; angle = a3; if (Cc != null) { Cc.AngleChangedEvent(this, change, mouseState); } Redraw(includeInFixedBackground); } }