From 3cc90ce2d27dcd0cdf24d691cb5e5fb1d3e530f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Wed, 15 Mar 2017 11:48:28 +0100 Subject: [PATCH] Fixed center-on-zoom behaviour in the GAL canvas Fixes: lp:1672868 * https://bugs.launchpad.net/kicad/+bug/1672868 --- common/tool/common_tools.cpp | 5 +---- common/view/view_controls.cpp | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index d512cd834c..e2a551cbbc 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -89,10 +89,7 @@ int COMMON_TOOLS::ZoomCenter( const TOOL_EVENT& aEvent ) { KIGFX::VIEW_CONTROLS* ctls = getViewControls(); - if( ctls->IsCursorWarpingEnabled() ) - ctls->CenterOnCursor(); - else - getView()->SetCenter( getViewControls()->GetCursorPosition() ); + ctls->CenterOnCursor(); return 0; } diff --git a/common/view/view_controls.cpp b/common/view/view_controls.cpp index 03457ddcfc..4c2e10ac1b 100644 --- a/common/view/view_controls.cpp +++ b/common/view/view_controls.cpp @@ -76,7 +76,5 @@ void VIEW_CONTROLS::ApplySettings( const VC_SETTINGS& aSettings ) SetAutoPan( aSettings.m_autoPanEnabled ); SetAutoPanMargin( aSettings.m_autoPanMargin ); SetAutoPanSpeed( aSettings.m_autoPanSpeed ); - EnableCursorWarping( aSettings.m_warpCursor ); - EnableMousewheelPan( aSettings.m_enableMousewheelPan ); ForceCursorPosition( aSettings.m_forceCursorPosition, aSettings.m_forcedPosition ); }