Clear field listener when quitting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18016
(cherry picked from commit 2836025402
)
Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
parent
e66d25b6e8
commit
1defa3872e
|
@ -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