Mercurial > projects > mde
diff mde/gui/widget/miscContent.d @ 140:c94ec5594449
Fixed a bug with changing the minimal size and optimised it slightly.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 08 Feb 2009 15:20:11 +0000 |
parents | 9f035cd139c6 |
children | 2ac3e0012788 |
line wrap: on
line diff
--- a/mde/gui/widget/miscContent.d Sun Feb 08 11:55:36 2009 +0000 +++ b/mde/gui/widget/miscContent.d Sun Feb 08 15:20:11 2009 +0000 @@ -183,11 +183,11 @@ mh = currentW.minHeight; parent.minWChange (this, mw); parent.minHChange (this, mh); - // If resizable and already large enough, don't resize; else do. - if (isWS && w > mw) currentW.setWidth (w, -1); - else w = currentW.width; - if (isHS && h > mh) currentW.setHeight (h, -1); - else h = currentW.height; + // Parent may change size. If it doesn't, we must set child's size. + // We can't tell if it did, so do it (call will be fast if size isn't + // changed anyway). + currentW.setWidth (w, -1); + currentW.setHeight (h, -1); currentW.setPosition (x,y); }