[longomatch] Fix moving positions outside of the field boundaries
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix moving positions outside of the field boundaries
- Date: Wed, 5 Nov 2014 19:00:55 +0000 (UTC)
commit b5270e6a20296233bed8b80e95d26bed690bb38f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Oct 29 22:55:32 2014 +0100
Fix moving positions outside of the field boundaries
LongoMatch.Drawing/CanvasObjects/PositionObject.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
index a7e9654..2efc5b0 100644
--- a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
@@ -114,10 +114,10 @@ namespace LongoMatch.Drawing.CanvasObjects
{
switch (sel.Position) {
case SelectionPosition.LineStart:
- Start = p;
+ Start = new Point (Math.Max (p.X, 0), Math.Max (p.Y, 0));
break;
case SelectionPosition.LineStop:
- Stop = p;
+ Stop = new Point (Math.Max (p.X, 0), Math.Max (p.Y, 0));
break;
default:
throw new Exception ("Unsupported move for circle: " + sel.Position);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]