aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjp <jp_bruyere@hotmail.com>2016-04-19 12:02:54 +0200
committerjp <jp_bruyere@hotmail.com>2016-04-19 12:02:54 +0200
commit8f841bd580d8a1ed3fd341e83dce478d9a9ca6bb (patch)
treee9063d2a8534915ffc3af7eda946ad9afe1e6d7b /src/GraphicObjects/GraphicObject.cs
parente99931681315513110cd7be2053c1e51e14c08c1 (diff)
use int.MinValue as error mark while measuring object to requeue Layouting
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 8877c6b2..7020cc3f 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -816,6 +816,9 @@ namespace Crow
else
Slot.Width = Parent.ClientRectangle.Width * Width / 100;
+ if (Slot.Width == int.MinValue)
+ return false;
+
//size constrain
if (Slot.Width < MinimumSize.Width) {
Slot.Width = MinimumSize.Width;
@@ -846,6 +849,9 @@ namespace Crow
else
Slot.Height = Parent.ClientRectangle.Height * Height.Value / 100;
+ if (Slot.Height == int.MinValue)
+ return false;
+
//size constrain
if (Slot.Height < MinimumSize.Height) {
Slot.Height = MinimumSize.Height;