1
0
Fork 0

only user specified negative coords are interpreted as relative to the upper

right corner, not those that are result of centering a dialog if no x/y are
given. This centers screen.log messages correctly. But maybe we have to
rethink that special meaning of negative coords altogether.
This commit is contained in:
mfranz 2006-02-12 19:43:53 +00:00
parent 35eb03bc68
commit f5469ba9fe

View file

@ -445,9 +445,9 @@ FGDialog::display (SGPropertyNode * props)
// Negative x/y coordinates are interpreted as distance from the top/right // Negative x/y coordinates are interpreted as distance from the top/right
// corner rather than bottom/left. // corner rather than bottom/left.
if (px < 0) if (userx && px < 0)
px = screenw - pw + px; px = screenw - pw + px;
if (py < 0) if (usery && py < 0)
py = screenh - ph + py; py = screenh - ph + py;
// Define "x", "y", "width" and/or "height" in the property tree if they // Define "x", "y", "width" and/or "height" in the property tree if they