fix get-view in snip-admin% to not return negative sizes

svn: r5804
This commit is contained in:
Matthew Flatt 2007-03-21 04:01:20 +00:00
parent 2ac0833f10
commit 366888de5d

View File

@ -2796,10 +2796,18 @@ void wxStandardSnipAdmin::GetView(double *x, double *y, double *w, double *h, wx
*x = l - sl;
if (y)
*y = t - st;
if (w)
*w = (r - l);
if (h)
*h = (b - t);
if (w) {
if (r < l)
*w = 0;
else
*w = (r - l);
}
if (h) {
if (b < t)
*h = 0;
else
*h = (b - t);
}
return;
}