]> git.mxchange.org Git - flightgear.git/commitdiff
only user specified negative coords are interpreted as relative to the upper
authormfranz <mfranz>
Sun, 12 Feb 2006 19:43:53 +0000 (19:43 +0000)
committermfranz <mfranz>
Sun, 12 Feb 2006 19:43:53 +0000 (19:43 +0000)
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.

src/GUI/dialog.cxx

index 4982ec33f7da73753bc045a8aa5080c301c277cf..8d19187d2e4d4d61ad2b4be40f9025016713fa50 100644 (file)
@@ -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