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:
Robert Osfield 2003-04-10 12:55:48 +00:00
parent 22546b8085
commit bc4fd5b051
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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)