Moved the diaglog title bar widgets into the Widget::GraphicsSubgraph map to avoid them poluting the Dialog's children list and to prevent them from being serialized.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14441 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-09-09 15:14:35 +00:00
parent e93e7ca1f2
commit 57a42aac39
4 changed files with 41 additions and 4 deletions

View File

@@ -21,7 +21,8 @@
using namespace osgUI;
CloseCallback::CloseCallback(const std::string& callbackName)
CloseCallback::CloseCallback(const std::string& callbackName, osgUI::Widget* closeWidget):
_closeWidget(closeWidget)
{
setName(callbackName);
}
@@ -32,6 +33,11 @@ CloseCallback::CloseCallback(const CloseCallback& hc, const osg::CopyOp& copyop)
bool CloseCallback::run(osg::Object* object, osg::Parameters&, osg::Parameters&) const
{
if (_closeWidget.valid())
{
_closeWidget->setVisible(false);
}
osg::Node* node = dynamic_cast<osg::Node*>(object);
if (node)
{