Schematic: sheet pin dragging special case needs to check endpoints

Otherwise we'll force the wrong end of a line to be special-cased
This commit is contained in:
Mike Williams 2022-12-27 12:14:18 -05:00
parent 33b774685b
commit 8ca8f83a18
1 changed files with 2 additions and 2 deletions

View File

@ -744,9 +744,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
// along the sheet edges.
for( const auto& [pin, lineEnd] : m_specialCaseSheetPins )
{
if( lineEnd.second )
if( lineEnd.second && lineEnd.first->HasFlag( STARTPOINT ) )
lineEnd.first->SetStartPoint( pin->GetPosition() );
else
else if( !lineEnd.second && lineEnd.first->HasFlag( ENDPOINT ) )
lineEnd.first->SetEndPoint( pin->GetPosition() );
}
}