[longomatch] Fix in a better way redraws after resizing



commit c70d6b06115546de33c37527289ff2e882d89969
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Oct 3 19:49:22 2014 +0200

    Fix in a better way redraws after resizing

 LongoMatch.Drawing/Widgets/DashboardCanvas.cs |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index 8e3d633..e6696f5 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -103,12 +103,6 @@ namespace LongoMatch.Drawing.Widgets
                        set {
                                fitMode = value;
                                Refresh ();
-                               /* When changing the fit mode we don't know yet the final
-                                * size of the widget, so the stored DrawArea is for the old
-                                * size. We need to wait until the next resize event to get it right */
-                               foreach (TaggerObject to in Objects) {
-                                       to.ResetDrawArea ();
-                               }
                        }
                        get {
                                return fitMode;
@@ -249,7 +243,6 @@ namespace LongoMatch.Drawing.Widgets
                        }
                        Edited = false;
                        SizeChanged ();
-                       widget.ReDraw ();
                }
 
                void SizeChanged ()
@@ -272,6 +265,10 @@ namespace LongoMatch.Drawing.Widgets
                                                   (int)widget.Width, (int)widget.Height,
                                                   out scaleX, out scaleY, out translation);
                        }
+                       foreach (TaggerObject to in Objects) {
+                               to.ResetDrawArea ();
+                       }
+                       widget.ReDraw ();
                }
 
                void HandleTaggerClickedEvent (ICanvasObject co)


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