* Andy Ross -- Saturday 14 May 2005 19:35:
> The real question is: what is the code that is reading from the
> removed node?
For example, the removed "x" value on second display is read again:
Here:
--- dialog.cxx 6 May 2005 11:46:52 -0000 1.30
+++ dialog.cxx 14 May 2005 18:10:05 -0000
@@ -370,7 +370,7 @@ FGDialog::display (SGPropertyNode * prop
wid.calcPrefSize(&pw, &ph);
pw = props->getIntValue("width", pw);
ph = props->getIntValue("height", ph);
! int px = props->getIntValue("x", (screenw - pw) / 2);
int py = props->getIntValue("y", (screenh - ph) / 2);
wid.layout(px, py, pw, ph);
and here:
@@ -398,7 +398,7 @@ FGDialog::makeObject (SGPropertyNode * p
bool presetSize = props->hasValue("width") && props->hasValue("height");
int width = props->getIntValue("width", parentWidth);
int height = props->getIntValue("height", parentHeight);
! int x = props->getIntValue("x", (parentWidth - width) / 2);
int y = props->getIntValue("y", (parentHeight - height) / 2);
sgVec4 color = {0.8, 0.8, 0.9, 0.85};
Seems that getIntValue doesn't care if a node was deleted or not. It
simply reads it out, and gets a default value: that is 0. That's why
x = y = width= height = 0 and the dialog sits in the corner and is
"transparent" (it isnt' transparent -- it just has no size).
m.
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d