From 6d335f2a82625c07313d0ce4e3cfddcbcf1aedc1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 16 Jun 2019 11:03:56 +0100 Subject: [PATCH] While Seth fixed the main issue, repeated Activate() calls probably still aren't a good idea. (The main issue was addressed here: 552815d48617c08a6ec29f22c7ecdf1906988e11.) --- pcbnew/tools/drawing_tool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 3c45773f59..cf73b54236 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -263,6 +263,8 @@ int DRAWING_TOOL::DrawLine( const TOOL_EVENT& aEvent ) m_frame->SetToolID( m_editModules ? ID_MODEDIT_LINE_TOOL : ID_PCB_ADD_LINE_BUTT, wxCURSOR_PENCIL, _( "Add graphic line" ) ); + Activate(); + while( drawSegment( S_SEGMENT, line, startingPoint ) ) { // This can be reset by some actions (e.g. Save Board), so ensure it stays set. @@ -308,6 +310,8 @@ int DRAWING_TOOL::DrawCircle( const TOOL_EVENT& aEvent ) m_frame->SetToolID( m_editModules ? ID_MODEDIT_CIRCLE_TOOL : ID_PCB_CIRCLE_BUTT, wxCURSOR_PENCIL, _( "Add graphic circle" ) ); + Activate(); + while( drawSegment( S_CIRCLE, circle ) ) { // This can be reset by some actions (e.g. Save Board), so ensure it stays set. @@ -1010,8 +1014,6 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, OPTRunAction( PCB_ACTIONS::selectionClear, true ); m_controls->ShowCursor( true ); - Activate(); - bool direction45 = false; // 45 degrees only mode bool started = false; bool isLocalOriginSet = ( m_frame->GetScreen()->m_LocalOrigin != VECTOR2D( 0, 0 ) );