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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user