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.
This commit is contained in:
Maciej Suminski 2018-02-14 17:34:30 +01:00
parent 104b606ca9
commit 6afdf1cf87
1 changed files with 4 additions and 3 deletions

View File

@ -859,9 +859,10 @@ int ROUTER_TOOL::mainLoop( PNS::ROUTER_MODE aMode )
m_router->SetMode( aMode ); m_router->SetMode( aMode );
controls()->ShowCursor( true ); VIEW_CONTROLS* ctls = getViewControls();
ctls->ShowCursor( true );
m_startSnapPoint = getViewControls()->GetCursorPosition(); ctls->ForceCursorPosition( false );
m_startSnapPoint = ctls->GetCursorPosition();
std::unique_ptr<ROUTER_TOOL_MENU> ctxMenu( new ROUTER_TOOL_MENU( board, *frame, aMode ) ); std::unique_ptr<ROUTER_TOOL_MENU> ctxMenu( new ROUTER_TOOL_MENU( board, *frame, aMode ) );
SetContextMenu( ctxMenu.get() ); SetContextMenu( ctxMenu.get() );