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
This commit is contained in:
Martin McNamara 2019-05-11 09:02:59 +01:00 committed by Seth Hillbrand
parent 0a308c4584
commit 7200f4d7b5
1 changed files with 4 additions and 0 deletions

View File

@ -433,7 +433,10 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
} ); } );
if( textPcb->GetText().IsEmpty() ) if( textPcb->GetText().IsEmpty() )
{
m_controls->ForceCursorPosition( false );
delete textPcb; delete textPcb;
}
else else
text = textPcb; text = textPcb;
} }
@ -677,6 +680,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
delete dimension; delete dimension;
m_controls->SetAutoPan( false ); m_controls->SetAutoPan( false );
m_controls->ForceCursorPosition( false );
m_view->Remove( &preview ); m_view->Remove( &preview );
frame()->SetMsgPanel( board() ); frame()->SetMsgPanel( board() );