From 2221764b06e69a2b77207cfa609141b3a06c8baa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Fri, 23 Feb 2018 12:07:22 +0100 Subject: crowIDE wip, lock layouting for items loading in tg --- src/Interface.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/Interface.cs') diff --git a/src/Interface.cs b/src/Interface.cs index 485101e6..3d2389b2 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -1091,16 +1091,18 @@ namespace Crow public void ShowContextMenu (GraphicObject go) { - if (ctxMenuContainer.Parent == null) - this.AddWidget (ctxMenuContainer); - else - ctxMenuContainer.IsOpened = true; + lock (UpdateMutex) { + if (ctxMenuContainer.Parent == null) + this.AddWidget (ctxMenuContainer); + else + ctxMenuContainer.IsOpened = true; - ctxMenuContainer.isPopup = true; - ctxMenuContainer.LogicalParent = go; - ctxMenuContainer.DataSource = go; + ctxMenuContainer.isPopup = true; + ctxMenuContainer.LogicalParent = go; + ctxMenuContainer.DataSource = go; - PutOnTop (ctxMenuContainer, true); + PutOnTop (ctxMenuContainer, true); + } ctxMenuContainer.Left = Mouse.X - 5; ctxMenuContainer.Top = Mouse.Y - 5; -- cgit v1.3.1-4-g156e