Added if (!_kbmcb) to handle the case where the keyboard mouse callback
is pre set.
This commit is contained in:
parent
49a28660dc
commit
98f691f693
@ -88,7 +88,9 @@ void Viewer::setUpViewer(unsigned int options)
|
|||||||
_start_tick = _timer.tick();
|
_start_tick = _timer.tick();
|
||||||
|
|
||||||
// set the keyboard mouse callback to catch the events from the windows.
|
// set the keyboard mouse callback to catch the events from the windows.
|
||||||
_kbmcb = new osgProducer::KeyboardMouseCallback( kbm, _done, (options & ESCAPE_SETS_DONE)!=0 );
|
if (!_kbmcb)
|
||||||
|
_kbmcb = new osgProducer::KeyboardMouseCallback( kbm, _done, (options & ESCAPE_SETS_DONE)!=0 );
|
||||||
|
|
||||||
_kbmcb->setStartTick(_start_tick);
|
_kbmcb->setStartTick(_start_tick);
|
||||||
|
|
||||||
// register the callback with the keyboard mouse manger.
|
// register the callback with the keyboard mouse manger.
|
||||||
|
Loading…
Reference in New Issue
Block a user