@@ -259,7 +259,7 @@ void GlobePlugin::setupMap()
259
259
struct PanControlHandler : public NavigationControlHandler
260
260
{
261
261
PanControlHandler ( osgEarthUtil::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
262
- virtual void onMouseDown ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
262
+ virtual void onMouseDown ( Control* control, int mouseButtonMask )
263
263
{
264
264
_manip->pan ( _dx, _dy );
265
265
}
@@ -272,7 +272,7 @@ struct PanControlHandler : public NavigationControlHandler
272
272
struct RotateControlHandler : public NavigationControlHandler
273
273
{
274
274
RotateControlHandler ( osgEarthUtil::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
275
- virtual void onMouseDown ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
275
+ virtual void onMouseDown ( Control* control, int mouseButtonMask )
276
276
{
277
277
if ( 0 == _dx && 0 == _dy )
278
278
{
@@ -292,7 +292,7 @@ struct RotateControlHandler : public NavigationControlHandler
292
292
struct ZoomControlHandler : public NavigationControlHandler
293
293
{
294
294
ZoomControlHandler ( osgEarthUtil::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
295
- virtual void onMouseDown ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
295
+ virtual void onMouseDown ( Control* control, int mouseButtonMask )
296
296
{
297
297
_manip->zoom ( _dx, _dy );
298
298
}
@@ -305,7 +305,7 @@ struct ZoomControlHandler : public NavigationControlHandler
305
305
struct HomeControlHandler : public NavigationControlHandler
306
306
{
307
307
HomeControlHandler ( osgEarthUtil::EarthManipulator* manip ) : _manip( manip ) { }
308
- virtual void onMouseDown ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
308
+ virtual void onClick ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
309
309
{
310
310
_manip->home ( ea, aa );
311
311
}
@@ -696,7 +696,11 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
696
696
for ( ControlEventHandlerList::const_iterator i = _eventHandlers.begin (); i != _eventHandlers.end (); ++i )
697
697
{
698
698
NavigationControlHandler* handler = dynamic_cast <NavigationControlHandler*>( i->get () );
699
- if ( handler ) handler->onMouseDown ( this , ea.getButtonMask (), ea, aa );
699
+ if ( handler )
700
+ {
701
+ handler->onMouseDown ( this , ea.getButtonMask () );
702
+ handler->onClick ( this , ea.getButtonMask (), ea, aa );
703
+ }
700
704
}
701
705
}
702
706
return Control::handle ( ea, aa, cx );
0 commit comments