From 6afdf1cf875a1c6974a1e886ff91b3de3bcd840c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 Feb 2018 17:34:30 +0100 Subject: [PATCH] PNS router: reset forced cursor position Track dragging forces the cursor position, which is still kept when PNS router is launched again. It is avoided by resetting the force cursor position option before running the event loop. --- pcbnew/router/router_tool.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index b42dc66136..e54413714b 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -859,9 +859,10 @@ int ROUTER_TOOL::mainLoop( PNS::ROUTER_MODE aMode ) m_router->SetMode( aMode ); - controls()->ShowCursor( true ); - - m_startSnapPoint = getViewControls()->GetCursorPosition(); + VIEW_CONTROLS* ctls = getViewControls(); + ctls->ShowCursor( true ); + ctls->ForceCursorPosition( false ); + m_startSnapPoint = ctls->GetCursorPosition(); std::unique_ptr ctxMenu( new ROUTER_TOOL_MENU( board, *frame, aMode ) ); SetContextMenu( ctxMenu.get() );