[longomatch] Reset cursors currectly when there was no movement
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Reset cursors currectly when there was no movement
- Date: Tue, 14 Oct 2014 15:48:07 +0000 (UTC)
commit 4b3a5c56d85eb2f884e6af34c6afbdf48ba2c200
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Oct 14 13:38:36 2014 +0200
Reset cursors currectly when there was no movement
LongoMatch.Drawing/Canvas.cs | 8 +++-----
LongoMatch.Drawing/Widgets/Blackboard.cs | 2 +-
LongoMatch.Drawing/Widgets/DashboardCanvas.cs | 6 +++---
LongoMatch.Drawing/Widgets/TimersTimeline.cs | 2 +-
4 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
index 6d7a99b..a492e48 100644
--- a/LongoMatch.Drawing/Canvas.cs
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -245,7 +245,7 @@ namespace LongoMatch.Drawing
{
}
- protected virtual void StopMove ()
+ protected virtual void StopMove (bool moved)
{
}
@@ -396,10 +396,8 @@ namespace LongoMatch.Drawing
(clickedSel.Drawable as ICanvasSelectableObject).ClickReleased ();
clickedSel = null;
}
- if (moved) {
- StopMove ();
- moved = false;
- }
+ StopMove (moved);
+ moved = false;
}
void HandleButtonPressEvent (Point coords, uint time, ButtonType type, ButtonModifier
modifier)
diff --git a/LongoMatch.Drawing/Widgets/Blackboard.cs b/LongoMatch.Drawing/Widgets/Blackboard.cs
index fc46a27..3ec08ea 100644
--- a/LongoMatch.Drawing/Widgets/Blackboard.cs
+++ b/LongoMatch.Drawing/Widgets/Blackboard.cs
@@ -267,7 +267,7 @@ namespace LongoMatch.Drawing.Widgets
}
}
- protected override void StopMove ()
+ protected override void StopMove (bool moved)
{
Selection sel = Selections.FirstOrDefault ();
if (sel != null) {
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index d51ae71..d8de0a3 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -185,11 +185,11 @@ namespace LongoMatch.Drawing.Widgets
base.SelectionChanged (sel);
}
- protected override void StopMove ()
+ protected override void StopMove (bool moved)
{
Selection sel = Selections.FirstOrDefault ();
- if (sel != null) {
+ if (sel != null && moved) {
int i = Constants.CATEGORY_TPL_GRID;
DashboardButton tb = (sel.Drawable as TaggerObject).Tagger;
tb.Position.X = Utils.Round (tb.Position.X, i);
@@ -199,7 +199,7 @@ namespace LongoMatch.Drawing.Widgets
widget.ReDraw ();
}
- base.StopMove ();
+ base.StopMove (moved);
}
public override void Draw (IContext context, Area area)
diff --git a/LongoMatch.Drawing/Widgets/TimersTimeline.cs b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
index bb2ab6a..31791af 100644
--- a/LongoMatch.Drawing/Widgets/TimersTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
@@ -99,7 +99,7 @@ namespace LongoMatch.Drawing.Widgets
}
}
- protected override void StopMove ()
+ protected override void StopMove (bool moved)
{
widget.SetCursor (CursorType.Arrow);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]