Added if (!_kbmcb) to handle the case where the keyboard mouse callback

is pre set.
This commit is contained in:
Robert Osfield 2003-04-06 21:46:48 +00:00
parent 49a28660dc
commit 98f691f693

View File

@ -88,7 +88,9 @@ void Viewer::setUpViewer(unsigned int options)
_start_tick = _timer.tick();
// set the keyboard mouse callback to catch the events from the windows.
if (!_kbmcb)
_kbmcb = new osgProducer::KeyboardMouseCallback( kbm, _done, (options & ESCAPE_SETS_DONE)!=0 );
_kbmcb->setStartTick(_start_tick);
// register the callback with the keyboard mouse manger.