diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-07 15:44:25 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-07 15:44:25 +0100 |
| commit | 46f593f8d2a9c76b582720e0a44af3075f879a93 (patch) | |
| tree | d24a6665d92bd4fe91ec7a8d34dc3206fc18f8c5 /src/LayoutingQueueItem.cs | |
| parent | 1c7f2d63a7230cb487faf915b9431784653f48ef (diff) | |
prevent RegisterForLayouting when parent is null, and dequeue LQI when parent of GO is null
Diffstat (limited to 'src/LayoutingQueueItem.cs')
| -rw-r--r-- | src/LayoutingQueueItem.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index d5ad7fcc..ef787d35 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -55,16 +55,14 @@ namespace Crow Debug.WriteLine ("Layouting => " + this.ToString ()); #endif - try { - if (GraphicObject.Parent == null){ - Debug.WriteLine("ERROR: processLayouting, no parent for: " + GraphicObject.ToString()); - return; - } - if (!GraphicObject.UpdateLayout (LayoutType)) - Interface.LayoutingQueue.Enqueue(this); - } catch (Exception ex) { - Debug.WriteLine ("Layouting error: " + ex.ToString ()); + if (GraphicObject.Parent == null) { + //cancel layouting for object without parent, maybe some were in queue when + //removed from a listbox + Debug.WriteLine ("ERROR: processLayouting, no parent for: " + this.ToString ()); + return; } + if (!GraphicObject.UpdateLayout (LayoutType)) + Interface.LayoutingQueue.Enqueue(this); } public static implicit operator GraphicObject(LayoutingQueueItem queueItem) |