Skip to content

Commit 5906eef

Browse files
committed
onClick event on mouse release
1 parent b0f3d4e commit 5906eef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/plugins/globe/globe_plugin.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,14 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
687687
}
688688
break;
689689
case osgGA::GUIEventAdapter::RELEASE:
690+
for( ControlEventHandlerList::const_iterator i = _eventHandlers.begin(); i != _eventHandlers.end(); ++i )
691+
{
692+
NavigationControlHandler* handler = dynamic_cast<NavigationControlHandler*>( i->get() );
693+
if( handler )
694+
{
695+
handler->onClick( this, ea.getButtonMask(), ea, aa );
696+
}
697+
}
690698
_mouse_down_event = NULL;
691699
break;
692700
}
@@ -699,7 +707,6 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
699707
if( handler )
700708
{
701709
handler->onMouseDown( this, ea.getButtonMask() );
702-
handler->onClick( this, ea.getButtonMask(), ea, aa );
703710
}
704711
}
705712
}

0 commit comments

Comments
 (0)