Fixed center-on-zoom behaviour in the GAL canvas

Fixes: lp:1672868
* https://bugs.launchpad.net/kicad/+bug/1672868
This commit is contained in:
Tomasz Włostowski 2017-03-15 11:48:28 +01:00
parent 0a29ab9031
commit 3cc90ce2d2
2 changed files with 1 additions and 6 deletions

View File

@ -89,10 +89,7 @@ int COMMON_TOOLS::ZoomCenter( const TOOL_EVENT& aEvent )
{ {
KIGFX::VIEW_CONTROLS* ctls = getViewControls(); KIGFX::VIEW_CONTROLS* ctls = getViewControls();
if( ctls->IsCursorWarpingEnabled() )
ctls->CenterOnCursor(); ctls->CenterOnCursor();
else
getView()->SetCenter( getViewControls()->GetCursorPosition() );
return 0; return 0;
} }

View File

@ -76,7 +76,5 @@ void VIEW_CONTROLS::ApplySettings( const VC_SETTINGS& aSettings )
SetAutoPan( aSettings.m_autoPanEnabled ); SetAutoPan( aSettings.m_autoPanEnabled );
SetAutoPanMargin( aSettings.m_autoPanMargin ); SetAutoPanMargin( aSettings.m_autoPanMargin );
SetAutoPanSpeed( aSettings.m_autoPanSpeed ); SetAutoPanSpeed( aSettings.m_autoPanSpeed );
EnableCursorWarping( aSettings.m_warpCursor );
EnableMousewheelPan( aSettings.m_enableMousewheelPan );
ForceCursorPosition( aSettings.m_forceCursorPosition, aSettings.m_forcedPosition ); ForceCursorPosition( aSettings.m_forceCursorPosition, aSettings.m_forcedPosition );
} }