From 649e3c81ca16138aa2a8084991462cc3a8a62038 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 24 Jan 2017 01:28:16 +0100 Subject: [PATCH] add debug msg for DEBUG_LAYOUTING --- src/GraphicObjects/GraphicObject.cs | 4 +--- src/LayoutingQueueItem.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 18745fa1..fc13c4a1 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -250,7 +250,6 @@ namespace Crow set { if (horizontalAlignment == value) return; - horizontalAlignment = value; NotifyValueChanged("HorizontalAlignment", horizontalAlignment); RegisterForLayouting (LayoutingType.X); @@ -262,7 +261,6 @@ namespace Crow set { if (left == value) return; - left = value; NotifyValueChanged ("Left", left); this.RegisterForLayouting (LayoutingType.X); @@ -274,7 +272,6 @@ namespace Crow set { if (top == value) return; - top = value; NotifyValueChanged ("Top", top); this.RegisterForLayouting (LayoutingType.Y); @@ -872,6 +869,7 @@ namespace Crow #if DEBUG_LAYOUTING CurrentInterface.currentLQI.Slot = LastSlots; CurrentInterface.currentLQI.NewSlot = Slot; + Debug.WriteLine ("\t\t{0} => {1}",LastSlots,Slot); #endif switch (layoutType) { diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 95bc6bb7..c7ae3024 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -83,6 +83,7 @@ namespace Crow LQITime = new Stopwatch(); Slot = Rectangle.Empty; NewSlot = Rectangle.Empty; + Debug.WriteLine ("\tRegister => " + this.ToString ()); #endif } #endregion @@ -100,13 +101,20 @@ namespace Crow } #if DEBUG_LAYOUTING LQITime.Start(); + Debug.WriteLine ("=> " + this.ToString ()); #endif LayoutingTries++; if (!Layoutable.UpdateLayout (LayoutType)) { + #if DEBUG_LAYOUTING + Debug.WriteLine ("\t\tRequeued"); + #endif if (LayoutingTries < Interface.MaxLayoutingTries) { Layoutable.RegisteredLayoutings |= LayoutType; (Layoutable as GraphicObject).CurrentInterface.LayoutingQueue.Enqueue (this); } else if (DiscardCount < Interface.MaxDiscardCount) { + #if DEBUG_LAYOUTING + Debug.WriteLine ("\t\tDiscarded"); + #endif LayoutingTries = 0; DiscardCount++; Layoutable.RegisteredLayoutings |= LayoutType; -- 2.47.3