Don't insert pins/text when moving
Pins and component fields belong to the parent object and need to be avoided when moving to prevent re-insertion on update. Fixes #3804 | https://gitlab.com/kicad/code/kicad/issues/3804 Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
This commit is contained in:
parent
ceceb6c39d
commit
84a697060f
|
@ -442,7 +442,24 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
// Moving items changes the RTree box bounds.
|
||||
for( auto item : selection )
|
||||
m_frame->GetScreen()->Update( static_cast<SCH_ITEM*>( item ) );
|
||||
{
|
||||
switch( item->Type() )
|
||||
{
|
||||
// Moving sheet pins does not change the BBox.
|
||||
case SCH_SHEET_PIN_T:
|
||||
break;
|
||||
|
||||
// Moving fields should update the associated component
|
||||
case SCH_FIELD_T:
|
||||
if( item->GetParent() )
|
||||
m_frame->GetScreen()->Update( static_cast<SCH_ITEM*>( item->GetParent() ) );
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
m_frame->GetScreen()->Update( static_cast<SCH_ITEM*>( item ) );
|
||||
}
|
||||
}
|
||||
|
||||
// If we move items away from a junction, we _may_ want to add a junction there
|
||||
// to denote the state.
|
||||
|
|
Loading…
Reference in New Issue