Browse Source

Repair deficiencies in swapData.

pull/18/head
Jeff Young 2 months ago
parent
commit
bf8809c841
  1. 2
      eeschema/sch_field.cpp
  2. 5
      eeschema/sch_item.cpp
  3. 2
      eeschema/sch_line.cpp
  4. 1
      eeschema/sch_shape.cpp
  5. 2
      eeschema/sch_text.cpp
  6. 1
      eeschema/sch_textbox.cpp

2
eeschema/sch_field.cpp

@ -402,11 +402,9 @@ void SCH_FIELD::swapData( SCH_ITEM* aItem )
SCH_FIELD* item = static_cast<SCH_FIELD*>( aItem );
std::swap( m_layer, item->m_layer );
std::swap( m_showName, item->m_showName );
std::swap( m_allowAutoPlace, item->m_allowAutoPlace );
std::swap( m_isGeneratedField, item->m_isGeneratedField );
std::swap( m_private, item->m_private );
SwapText( *item );
SwapAttributes( *item );

5
eeschema/sch_item.cpp

@ -490,6 +490,11 @@ void SCH_ITEM::SwapItemData( SCH_ITEM* aImage )
EDA_ITEM* parent = GetParent();
SwapFlags( aImage );
std::swap( m_layer, aImage->m_layer );
std::swap( m_unit, aImage->m_unit );
std::swap( m_bodyStyle, aImage->m_bodyStyle );
std::swap( m_private, aImage->m_private );
std::swap( m_fieldsAutoplaced, aImage->m_fieldsAutoplaced );
std::swap( m_group, aImage->m_group );
swapData( aImage );

2
eeschema/sch_line.cpp

@ -818,8 +818,6 @@ void SCH_LINE::swapData( SCH_ITEM* aItem )
{
SCH_LINE* item = (SCH_LINE*) aItem;
std::swap( m_layer, item->m_layer );
std::swap( m_start, item->m_start );
std::swap( m_end, item->m_end );
std::swap( m_startIsDangling, item->m_startIsDangling );

1
eeschema/sch_shape.cpp

@ -54,7 +54,6 @@ void SCH_SHAPE::swapData( SCH_ITEM* aItem )
SCH_SHAPE* shape = static_cast<SCH_SHAPE*>( aItem );
EDA_SHAPE::SwapShape( shape );
std::swap( m_layer, shape->m_layer );
}

2
eeschema/sch_text.cpp

@ -232,8 +232,6 @@ void SCH_TEXT::swapData( SCH_ITEM* aItem )
{
SCH_TEXT* item = static_cast<SCH_TEXT*>( aItem );
std::swap( m_layer, item->m_layer );
SwapText( *item );
SwapAttributes( *item );
}

1
eeschema/sch_textbox.cpp

@ -212,7 +212,6 @@ void SCH_TEXTBOX::swapData( SCH_ITEM* aItem )
SCH_TEXTBOX* item = static_cast<SCH_TEXTBOX*>( aItem );
std::swap( m_layer, item->m_layer );
std::swap( m_marginLeft, item->m_marginLeft );
std::swap( m_marginTop, item->m_marginTop );
std::swap( m_marginRight, item->m_marginRight );

Loading…
Cancel
Save