Remove unneeded wxWidgets version checks in the code
Now that the minimum version is 3.0.0, we don't need to actually
check if the version is greater than 3.0.0 inside the code.
(cherry picked from commit a37d8f2859
)
This commit is contained in:
parent
69b5d24f28
commit
2bd0bae2f7
|
@ -326,10 +326,8 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent )
|
|||
return;
|
||||
}
|
||||
|
||||
#if wxCHECK_VERSION( 3, 0, 0 )
|
||||
if( !m_parentPanel->HasFocus() )
|
||||
break;
|
||||
#endif
|
||||
|
||||
double borderSize = std::min( m_settings.m_autoPanMargin * m_view->GetScreenPixelSize().x,
|
||||
m_settings.m_autoPanMargin * m_view->GetScreenPixelSize().y );
|
||||
|
@ -626,16 +624,9 @@ void WX_VIEW_CONTROLS::refreshMouse()
|
|||
moveEvent.SetY( msp.y );
|
||||
|
||||
// Set the modifiers state
|
||||
#if wxCHECK_VERSION( 3, 0, 0 )
|
||||
moveEvent.SetControlDown( wxGetKeyState( WXK_CONTROL ) );
|
||||
moveEvent.SetShiftDown( wxGetKeyState( WXK_SHIFT ) );
|
||||
moveEvent.SetAltDown( wxGetKeyState( WXK_ALT ) );
|
||||
#else
|
||||
// wx <3.0 do not have accessors, but the fields are exposed
|
||||
moveEvent.m_controlDown = wxGetKeyState( WXK_CONTROL );
|
||||
moveEvent.m_shiftDown = wxGetKeyState( WXK_SHIFT );
|
||||
moveEvent.m_altDown = wxGetKeyState( WXK_ALT );
|
||||
#endif
|
||||
|
||||
m_cursorPos = m_view->ToWorld( VECTOR2D( msp.x, msp.y ) );
|
||||
wxPostEvent( m_parentPanel, moveEvent );
|
||||
|
|
Loading…
Reference in New Issue