From: mfranz Date: Sun, 12 Feb 2006 19:43:53 +0000 (+0000) Subject: only user specified negative coords are interpreted as relative to the upper X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f5469ba9fe90e46043fa2c6d67d6a9c5ba9a36ac;p=flightgear.git 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. --- diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 4982ec33f..8d19187d2 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -445,9 +445,9 @@ FGDialog::display (SGPropertyNode * props) // Negative x/y coordinates are interpreted as distance from the top/right // corner rather than bottom/left. - if (px < 0) + if (userx && px < 0) px = screenw - pw + px; - if (py < 0) + if (usery && py < 0) py = screenh - ph + py; // Define "x", "y", "width" and/or "height" in the property tree if they