From 3c78bf4ef88faf311fa977e6475d9899bf8cedd8 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 1 Nov 2021 16:17:33 +0000 Subject: [PATCH] One active point at a time. --- pcbnew/tools/pcb_point_editor.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index 2ebbc801de..2af2d0444c 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -474,6 +474,14 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent ) setAltConstraint( true ); m_editedPoint->SetActive(); + + for( size_t ii = 0; ii < m_editPoints->PointsSize(); ++ii ) + { + EDIT_POINT& point = m_editPoints->Point( ii ); + + if( &point != m_editedPoint ) + point.SetActive( false ); + } } VECTOR2I pos = evt->Position(); @@ -534,6 +542,15 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent ) else if( m_editedPoint && evt->Action() == TA_MOUSE_DOWN && evt->Buttons() == BUT_LEFT ) { m_editedPoint->SetActive(); + + for( size_t ii = 0; ii < m_editPoints->PointsSize(); ++ii ) + { + EDIT_POINT& point = m_editPoints->Point( ii ); + + if( &point != m_editedPoint ) + point.SetActive( false ); + } + getView()->Update( m_editPoints.get() ); } else if( inDrag && evt->IsMouseUp( BUT_LEFT ) )