Added usage of Producer::CameraGroup::isValidForRendering() to the Viewer::done()
implemention so apps automatically close if one of the windows is killed.
This commit is contained in:
parent
22546b8085
commit
bc4fd5b051
@ -71,7 +71,7 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
void setUpViewer(unsigned int options=STANDARD_SETTINGS);
|
||||
|
||||
/** return true if the application is done and should exit.*/
|
||||
bool done() const;
|
||||
virtual bool done() const;
|
||||
|
||||
/** Override the Producer::CameraGroup::setViewByMatrix to catch all changes to view.*/
|
||||
virtual void setViewByMatrix( const Producer::Matrix & pm);
|
||||
|
@ -174,7 +174,7 @@ unsigned int Viewer::addCameraManipulator(osgGA::CameraManipulator* cm)
|
||||
|
||||
bool Viewer::done() const
|
||||
{
|
||||
return _done;
|
||||
return _done || !validForRendering();
|
||||
}
|
||||
|
||||
void Viewer::setViewByMatrix( const Producer::Matrix & pm)
|
||||
|
Loading…
Reference in New Issue
Block a user