eeschema: add junction when needed for broken wire
The break wire command will break all wires at a point. If there are multiple crossing wires, we need to check to see if a junction might be required to reflect the new connection. Fixes: lp:1848450 * https://bugs.launchpad.net/kicad/+bug/1848450
This commit is contained in:
parent
e73e7bdc23
commit
363281dd4d
|
@ -1364,10 +1364,13 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
|
|||
|
||||
int SCH_EDIT_TOOL::BreakWire( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !aEvent.Modifier( MD_ALT ) );
|
||||
auto cursorPos = wxPoint( getViewControls()->GetCursorPosition( !aEvent.Modifier( MD_ALT ) ) );
|
||||
|
||||
if( m_frame->BreakSegments( (wxPoint) cursorPos ) )
|
||||
if( m_frame->BreakSegments( cursorPos ) )
|
||||
{
|
||||
if( m_frame->GetScreen()->IsJunctionNeeded( cursorPos, true ) )
|
||||
m_frame->AddJunction( cursorPos, true, false );
|
||||
|
||||
m_frame->TestDanglingEnds();
|
||||
|
||||
m_frame->OnModify();
|
||||
|
|
Loading…
Reference in New Issue