diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 722fab29f..7d1475bb9 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -406,6 +406,9 @@ FGDialog::display (SGPropertyNode * props) puObject * FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight) { + if (props->getBoolValue("hide")) + return 0; + bool presetSize = props->hasValue("width") && props->hasValue("height"); int width = props->getIntValue("width", parentWidth); int height = props->getIntValue("height", parentHeight); diff --git a/src/GUI/layout.cxx b/src/GUI/layout.cxx index 6783187db..b887894cc 100644 --- a/src/GUI/layout.cxx +++ b/src/GUI/layout.cxx @@ -39,6 +39,9 @@ void LayoutWidget::calcPrefSize(int* w, int* h) { *w = *h = 0; // Ask for nothing by default + if (getBool("hide")) + return; + int legw = stringLength(getStr("legend")); int labw = stringLength(getStr("label")); @@ -94,6 +97,9 @@ void LayoutWidget::calcPrefSize(int* w, int* h) // Set up geometry such that the widget lives "inside" the specified void LayoutWidget::layout(int x, int y, int w, int h) { + if (getBool("hide")) + return; + setNum("__bx", x); setNum("__by", y); setNum("__bw", w); @@ -192,6 +198,9 @@ void LayoutWidget::doHVBox(bool doLayout, bool vertical, int* w, int* h) int nEq = 0, eqA = 0, eqB = 0, eqTotalA = 0; for(i=0; i