F4 panning (GAL).

This commit is contained in:
Maciej Suminski 2015-07-09 17:09:34 +02:00
parent 33e1797116
commit 825fe8e5de
1 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,12 @@ int PCBNEW_CONTROL::ZoomCenter( const TOOL_EVENT& aEvent )
KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView(); KIGFX::VIEW* view = m_frame->GetGalCanvas()->GetView();
view->SetCenter( getViewControls()->GetCursorPosition() ); view->SetCenter( getViewControls()->GetCursorPosition() );
if( !getViewControls()->GetEnableZoomNoCenter() )
{
const VECTOR2I& screenSize = view->GetGAL()->GetScreenPixelSize();
m_frame->GetGalCanvas()->WarpPointer( screenSize.x / 2, screenSize.y / 2 );
}
return 0; return 0;
} }