Add a SCH_ITEM::operator= so the connections caches don't get copied.

Fixes https://gitlab.com/kicad/code/kicad/issues/9710
This commit is contained in:
Jeff Young 2021-11-21 16:54:00 +00:00
parent 9add03dd88
commit 15f309c8a8
2 changed files with 12 additions and 0 deletions

View File

@ -62,6 +62,16 @@ SCH_ITEM::SCH_ITEM( const SCH_ITEM& aItem ) :
}
SCH_ITEM& SCH_ITEM::operator=( const SCH_ITEM& aItem )
{
m_layer = aItem.m_layer;
m_fieldsAutoplaced = aItem.m_fieldsAutoplaced;
m_connectivity_dirty = true;
return *this;
}
SCH_ITEM::~SCH_ITEM()
{
// Do not let the connections container go out of scope with any objects or they

View File

@ -186,6 +186,8 @@ public:
SCH_ITEM( const SCH_ITEM& aItem );
SCH_ITEM& operator=( const SCH_ITEM& aPin );
virtual ~SCH_ITEM();
virtual wxString GetClass() const override