Show dangling pins when moving items; don't when dragging.

Fixes: lp:1801962
* https://bugs.launchpad.net/kicad/+bug/1801962

Fixes: lp:1801959
* https://bugs.launchpad.net/kicad/+bug/1801959
This commit is contained in:
Jeff Young 2018-11-07 14:22:29 +00:00
parent 5c26b1dabd
commit cbd13c7127
2 changed files with 17 additions and 11 deletions

View File

@ -254,6 +254,8 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
nextcmd = true;
block->SetState( STATE_BLOCK_MOVE );
if( block->GetCommand() != BLOCK_DRAG && block->GetCommand() != BLOCK_DRAG_ITEM )
{
// Mark dangling pins at the edges of the block:
std::vector<DANGLING_END_ITEM> internalPoints;
@ -268,6 +270,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
auto item = static_cast<SCH_ITEM*>( block->GetItem( i ) );
item->UpdateDanglingState( internalPoints );
}
}
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );

View File

@ -772,6 +772,9 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem )
SetUndoItem( aItem );
}
std::vector<DANGLING_END_ITEM> emptySet;
aItem->UpdateDanglingState( emptySet );
aItem->SetFlags( IS_MOVED );
if( aItem->Type() == SCH_FIELD_T && aItem->GetParent()->Type() == SCH_COMPONENT_T )