aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-01-04 01:09:54 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-01-04 01:09:54 +0100
commit1ba15ebcac390fae4ee4e7cda91f8c473913a5af (patch)
treebe42d7a9eec7d9499a8508fd584707d0f1e85cd5 /src
parentfd46c9eb9cc58667fbee1da09c2a5785817f6897 (diff)
lock layouting when image loading
Diffstat (limited to 'src')
-rw-r--r--src/GraphicObjects/Image.cs9
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