Browse Source

Fixed center-on-zoom behaviour in the GAL canvas

Fixes: lp:1672868
* https://bugs.launchpad.net/kicad/+bug/1672868
pull/3/merge
Tomasz Włostowski 9 years ago
parent
commit
3cc90ce2d2
  1. 3
      common/tool/common_tools.cpp
  2. 2
      common/view/view_controls.cpp

3
common/tool/common_tools.cpp

@ -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;
} }

2
common/view/view_controls.cpp

@ -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 );
} }
Loading…
Cancel
Save