diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-01-04 01:09:54 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-01-04 01:09:54 +0100 |
| commit | 1ba15ebcac390fae4ee4e7cda91f8c473913a5af (patch) | |
| tree | be42d7a9eec7d9499a8508fd584707d0f1e85cd5 /src/GraphicObjects/Image.cs | |
| parent | fd46c9eb9cc58667fbee1da09c2a5785817f6897 (diff) | |
lock layouting when image loading
Diffstat (limited to 'src/GraphicObjects/Image.cs')
| -rw-r--r-- | src/GraphicObjects/Image.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index 61b6e059..fa036b97 100644 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -50,9 +50,11 @@ namespace Crow _pic = null; return; } - LoadImage (value); - _pic.Scaled = scaled; - _pic.KeepProportions = keepProps; + lock(CurrentInterface.LayoutMutex){ + LoadImage (value); + _pic.Scaled = scaled; + _pic.KeepProportions = keepProps; + } } catch (Exception ex) { Debug.WriteLine (ex.Message); _pic = null; @@ -86,7 +88,6 @@ namespace Crow _pic.LoadImage (path); RegisterForGraphicUpdate (); - RegisterForLayouting (LayoutingType.Sizing); } #endregion |