Repair new junction logic for crossing wires.

Fixes https://gitlab.com/kicad/code/kicad/issues/9484
This commit is contained in:
Jeff Young 2021-10-29 19:08:24 +01:00
parent 63d4d84aaa
commit 1fa9ad227a
2 changed files with 4 additions and 1 deletions

View File

@ -445,6 +445,9 @@ bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew ) const
}
else if( line->HitTest( aPosition, -1 ) )
{
if( aNew )
breakLines[ layer ] = true;
// Defer any line midpoints until we know whether or not we're breaking them
midPointLines[ layer ].push_back( line );
}

View File

@ -725,7 +725,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
{
if( type == SCH_JUNCTION_T )
{
if( !m_frame->GetScreen()->IsJunctionNeeded( cursorPos ) )
if( !m_frame->GetScreen()->IsJunctionNeeded( cursorPos, true ) )
{
m_frame->ShowInfoBarError( _( "Junction location contains no joinable "
"wires and/or pins." ) );