kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #42053
[Patch] Remove unneeded wxWidgets tests
This patch removes two checks (and the unused code), since they tested for
version 3.0.0 and the minimum version required by CMake is wxWidgets 3.0.0.
From aa2c613dd13978c6befbcc1a48798ec1234eedd8 Mon Sep 17 00:00:00 2001
From: Ian McInerney <Ian.S.McInerney@xxxxxxxx>
Date: Thu, 5 Sep 2019 20:48:31 +0200
Subject: [PATCH] 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.
---
common/view/wx_view_controls.cpp | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp
index 6bb61632d..4d6fb72e8 100644
--- a/common/view/wx_view_controls.cpp
+++ b/common/view/wx_view_controls.cpp
@@ -353,10 +353,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 );
@@ -653,16 +651,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 );
--
2.21.0
Follow ups