diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index a96b464e3d..7bdaba8b4b 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -111,7 +111,8 @@ PCB_POINT_EDITOR::PCB_POINT_EDITOR() : m_original( VECTOR2I( 0, 0 ) ), m_refill( false ), m_arcEditMode( ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS ), - m_altConstrainer( VECTOR2I( 0, 0 ) ) + m_altConstrainer( VECTOR2I( 0, 0 ) ), + m_inPointEditorTool( false ) { } @@ -455,6 +456,11 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent ) if( !m_selectionTool || aEvent.Matches( EVENTS::InhibitSelectionEditing ) ) return 0; + if( m_inPointEditorTool ) + return 0; + + REENTRANCY_GUARD guard( &m_inPointEditorTool ); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame(); const PCB_SELECTION& selection = m_selectionTool->GetSelection(); diff --git a/pcbnew/tools/pcb_point_editor.h b/pcbnew/tools/pcb_point_editor.h index 19b141f6b8..384ce3ccd6 100644 --- a/pcbnew/tools/pcb_point_editor.h +++ b/pcbnew/tools/pcb_point_editor.h @@ -190,6 +190,8 @@ private: std::shared_ptr> m_altConstraint; EDIT_POINT m_altConstrainer; + bool m_inPointEditorTool; // Re-entrancy guard + static const unsigned int COORDS_PADDING; // Padding from coordinates limits for this tool };