Clear field listener when quitting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18016
This commit is contained in:
parent
fd438cb8e0
commit
2836025402
|
@ -120,6 +120,8 @@ SCHEMATIC::SCHEMATIC( PROJECT* aPrj ) :
|
|||
|
||||
SCHEMATIC::~SCHEMATIC()
|
||||
{
|
||||
PROPERTY_MANAGER::Instance().UnregisterListeners( TYPE_HASH( SCH_FIELD ) );
|
||||
|
||||
delete m_currentSheet;
|
||||
delete m_connectionGraph;
|
||||
}
|
||||
|
|
|
@ -277,6 +277,11 @@ public:
|
|||
m_listeners[aType].emplace_back( aListenerFunc );
|
||||
}
|
||||
|
||||
void UnregisterListeners( TYPE_ID aType )
|
||||
{
|
||||
m_listeners[aType].clear();
|
||||
}
|
||||
|
||||
private:
|
||||
PROPERTY_MANAGER() :
|
||||
m_dirty( false ),
|
||||
|
|
Loading…
Reference in New Issue