From 8c3d16a395bbe14e474988744fe52aa701a9c638 Mon Sep 17 00:00:00 2001 From: Martin McNamara Date: Sat, 11 May 2019 09:02:59 +0100 Subject: [PATCH] PCBnew: Fixes crosshair issue with "Place Text" and "Add Dimension". When using "Place Text" the crosshair was freezing if cancelled before placing text. After the crosshair freezes, the next uses of the "Place Text" or "Add Dimension" caused the crosshair to jump to the screen location where the previously the crosshair was frozen. Cancelling the "Add Dimension" caused the crosshair to jump to the screen location where the crosshair was when cancelled on the next use of the "Place Text" or "Add Dimension". Fixes: lp:1822578 * https://bugs.launchpad.net/kicad/+bug/1822578 --- pcbnew/tools/drawing_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index c118c1ea21..1af547d5b3 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -433,7 +433,10 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent ) } ); if( textPcb->GetText().IsEmpty() ) + { + m_controls->ForceCursorPosition( false ); delete textPcb; + } else text = textPcb; } @@ -678,6 +681,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent ) delete dimension; m_controls->SetAutoPan( false ); + m_controls->ForceCursorPosition( false ); m_view->Remove( &preview ); frame()->SetMsgPanel( board() );