Stops autopanning on left mouse button release.
This commit is contained in:
parent
5e3ab406e2
commit
cba1e0bf91
|
@ -44,6 +44,10 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) :
|
|||
WX_VIEW_CONTROLS::onButton ), NULL, this );
|
||||
m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler(
|
||||
WX_VIEW_CONTROLS::onButton ), NULL, this );
|
||||
m_parentPanel->Connect( wxEVT_LEFT_UP, wxMouseEventHandler(
|
||||
WX_VIEW_CONTROLS::onButton ), NULL, this );
|
||||
m_parentPanel->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(
|
||||
WX_VIEW_CONTROLS::onButton ), NULL, this );
|
||||
#if defined _WIN32 || defined _WIN64
|
||||
m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler(
|
||||
WX_VIEW_CONTROLS::onEnter ), NULL, this );
|
||||
|
@ -151,6 +155,11 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent )
|
|||
m_lookStartPoint = m_view->GetCenter();
|
||||
m_state = DRAG_PANNING;
|
||||
}
|
||||
|
||||
if( aEvent.LeftUp() )
|
||||
{
|
||||
m_state = IDLE; // Stop autopanning when user release left mouse button
|
||||
}
|
||||
break;
|
||||
|
||||
case DRAG_PANNING:
|
||||
|
|
Loading…
Reference in New Issue