From Jean-Sebastien Guay, "osgWidget::Window::setWindow() calls parented() (which does an addChild()) on the new window, but it does not call unparented() (which does a removeChild()) on the old window before. So it works fine if there was no window previously, but if an app creates new windows and calls setWindow() to replace the previous one, they will all add up instead and be on top of each other...

This is fixed in the file attached."
This commit is contained in:
Robert Osfield
2009-10-10 09:26:06 +00:00
parent 61544f51b6
commit 0aed782a47

View File

@@ -115,6 +115,9 @@ bool Window::EmbeddedWindow::setWindow(Window* win) {
return false;
}
if (_window.valid() && _parent)
unparented(_parent);
_window = win;
_window->resize();