From 7200f4d7b5669cc03378ba4a8b9382de67f39f09 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 2442adf6f8..a7dd00f1cf 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; } @@ -677,6 +680,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() );