diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Interface.cs | 2 | ||||
| -rw-r--r-- | src/LayoutingQueueItem.cs | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index d63b75de..de348d94 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -376,7 +376,7 @@ namespace Crow DiscardQueue = new Queue<LayoutingQueueItem> (); lock (LayoutMutex) { //Debug.WriteLine ("======= Layouting queue start ======="); - LayoutingQueueItem lqi = null; + LayoutingQueueItem lqi; while (LayoutingQueue.Count > 0) { lqi = LayoutingQueue.Dequeue (); #if DEBUG_LAYOUTING diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 2257ae8e..61646b15 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -41,7 +41,7 @@ namespace Crow /// <summary> /// Element class of the LayoutingQueue /// </summary> - public class LayoutingQueueItem + public struct LayoutingQueueItem { /// <summary> Instance of widget to be layouted</summary> public ILayoutable Layoutable; @@ -79,6 +79,8 @@ namespace Crow LayoutType = _layoutType; Layoutable = _graphicObject; Layoutable.RegisteredLayoutings |= LayoutType; + LayoutingTries = 0; + DiscardCount = 0; #if DEBUG_LAYOUTING GraphicObject g = graphicObject; g.CurrentInterface.curLQIs.Add(this); @@ -121,6 +123,11 @@ namespace Crow #endif } #if DEBUG_LAYOUTING + else{ + if (LayoutingTries > 1 || DiscardCount > 0) + Debug.WriteLine (this.ToString ()); + } + LQITime.Stop(); #endif } |