[longomatch] Select only boundaries for timer objects
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Select only boundaries for timer objects
- Date: Mon, 7 Jul 2014 11:30:49 +0000 (UTC)
commit 91e8f1dc6a7e9150c613333b3b4cc503fb2c1a5d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Jun 20 14:26:15 2014 +0200
Select only boundaries for timer objects
LongoMatch.Drawing/CanvasObject/TimeNodeObject.cs | 8 +++++++-
LongoMatch.Drawing/CanvasObject/TimelineObject.cs | 1 +
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObject/TimeNodeObject.cs
b/LongoMatch.Drawing/CanvasObject/TimeNodeObject.cs
index 052beb9..6162ec6 100644
--- a/LongoMatch.Drawing/CanvasObject/TimeNodeObject.cs
+++ b/LongoMatch.Drawing/CanvasObject/TimeNodeObject.cs
@@ -31,6 +31,7 @@ namespace LongoMatch.Drawing.CanvasObject
public TimeNodeObject (TimeNode node)
{
TimeNode = node;
+ SelectWhole = true;
}
public TimeNode TimeNode {
@@ -38,6 +39,11 @@ namespace LongoMatch.Drawing.CanvasObject
set;
}
+ public bool SelectWhole {
+ get;
+ set;
+ }
+
public Time MaxTime {
set;
protected get;
@@ -79,7 +85,7 @@ namespace LongoMatch.Drawing.CanvasObject
return new Selection (this, SelectionPosition.Left, accuracy);
} else if (Drawable.MatchAxis (point.X, StopX, precision, out accuracy)) {
return new Selection (this, SelectionPosition.Right, accuracy);
- } else if (point.X > StartX && point.X < StopX) {
+ } else if (SelectWhole && point.X > StartX && point.X < StopX) {
return new Selection (this, SelectionPosition.All,
Math.Abs (CenterX - point.X));
}
diff --git a/LongoMatch.Drawing/CanvasObject/TimelineObject.cs
b/LongoMatch.Drawing/CanvasObject/TimelineObject.cs
index f3a358f..c70c225 100644
--- a/LongoMatch.Drawing/CanvasObject/TimelineObject.cs
+++ b/LongoMatch.Drawing/CanvasObject/TimelineObject.cs
@@ -174,6 +174,7 @@ namespace LongoMatch.Drawing.CanvasObject
to.OffsetY = OffsetY;
to.SecondsPerPixel = SecondsPerPixel;
to.MaxTime = maxTime;
+ to.SelectWhole = false;
AddNode (to);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]