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:
parent
5c26b1dabd
commit
cbd13c7127
|
@ -254,19 +254,22 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
|||
nextcmd = true;
|
||||
block->SetState( STATE_BLOCK_MOVE );
|
||||
|
||||
// Mark dangling pins at the edges of the block:
|
||||
std::vector<DANGLING_END_ITEM> internalPoints;
|
||||
|
||||
for( unsigned i = 0; i < block->GetCount(); ++i )
|
||||
if( block->GetCommand() != BLOCK_DRAG && block->GetCommand() != BLOCK_DRAG_ITEM )
|
||||
{
|
||||
auto item = static_cast<SCH_ITEM*>( block->GetItem( i ) );
|
||||
item->GetEndPoints( internalPoints );
|
||||
}
|
||||
// Mark dangling pins at the edges of the block:
|
||||
std::vector<DANGLING_END_ITEM> internalPoints;
|
||||
|
||||
for( unsigned i = 0; i < block->GetCount(); ++i )
|
||||
{
|
||||
auto item = static_cast<SCH_ITEM*>( block->GetItem( i ) );
|
||||
item->UpdateDanglingState( internalPoints );
|
||||
for( unsigned i = 0; i < block->GetCount(); ++i )
|
||||
{
|
||||
auto item = static_cast<SCH_ITEM*>( block->GetItem( i ) );
|
||||
item->GetEndPoints( internalPoints );
|
||||
}
|
||||
|
||||
for( unsigned i = 0; i < block->GetCount(); ++i )
|
||||
{
|
||||
auto item = static_cast<SCH_ITEM*>( block->GetItem( i ) );
|
||||
item->UpdateDanglingState( internalPoints );
|
||||
}
|
||||
}
|
||||
|
||||
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue