remove item from schematic's connection graph on destruction
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17961
This commit is contained in:
parent
086e609c3d
commit
4920c6b00b
|
@ -34,6 +34,7 @@
|
|||
#include <sch_edit_frame.h>
|
||||
#include <schematic.h>
|
||||
#include <symbol.h>
|
||||
#include <connection_graph.h>
|
||||
#include <trace_helpers.h>
|
||||
#include <general.h>
|
||||
#include <netclass.h>
|
||||
|
@ -114,6 +115,11 @@ SCH_ITEM::~SCH_ITEM()
|
|||
{
|
||||
for( const auto& it : m_connection_map )
|
||||
delete it.second;
|
||||
|
||||
SCHEMATIC* sch = Schematic();
|
||||
|
||||
if( sch != nullptr )
|
||||
sch->ConnectionGraph()->RemoveItem( this );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue