aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
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;