Disable autopanning when GAL panel does not have focus.

This commit is contained in:
Maciej Suminski 2014-05-14 09:42:16 +02:00
parent 562beafcde
commit 129e26d512
1 changed files with 5 additions and 0 deletions

View File

@ -217,6 +217,11 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent )
{ {
case AUTO_PANNING: case AUTO_PANNING:
{ {
#if wxCHECK_VERSION( 3, 0, 0 )
if( !m_parentPanel->HasFocus() )
break;
#endif
double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x,
m_autoPanMargin * m_view->GetScreenPixelSize().y ); m_autoPanMargin * m_view->GetScreenPixelSize().y );