[longomatch] Add argument to silent changes notifications



commit 4ebb5b4d2eee9c124615182e3e747bc6d1461a9d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jun 19 12:46:34 2014 +0200

    Add argument to silent changes notifications

 LongoMatch.Drawing/Canvas.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
index 078b26c..cb530c7 100644
--- a/LongoMatch.Drawing/Canvas.cs
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -129,17 +129,18 @@ namespace LongoMatch.Drawing
                        Selections.Clear ();
                }
                
-               protected void UpdateSelection (Selection sel) {
+               protected void UpdateSelection (Selection sel, bool notify=true) {
                        ICanvasSelectableObject so = sel.Drawable as ICanvasSelectableObject;
                        Selection seldup = Selections.FirstOrDefault (s => s.Drawable == sel.Drawable);
                        
                        if (seldup != null) {
                                so.Selected = false;
                                Selections.Remove (seldup);
-                               SelectionChanged (Selections);
                        } else {
                                so.Selected = true;
                                Selections.Add (sel);
+                       }
+                       if (notify) {
                                SelectionChanged (Selections);
                        }
                        widget.ReDraw (so);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]