One active point at a time.

This commit is contained in:
Jeff Young 2021-11-01 16:17:33 +00:00
parent 5275393a94
commit 3c78bf4ef8
1 changed files with 17 additions and 0 deletions

View File

@ -474,6 +474,14 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
setAltConstraint( true ); setAltConstraint( true );
m_editedPoint->SetActive(); 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(); 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 ) else if( m_editedPoint && evt->Action() == TA_MOUSE_DOWN && evt->Buttons() == BUT_LEFT )
{ {
m_editedPoint->SetActive(); 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() ); getView()->Update( m_editPoints.get() );
} }
else if( inDrag && evt->IsMouseUp( BUT_LEFT ) ) else if( inDrag && evt->IsMouseUp( BUT_LEFT ) )