eeschema: don't save and restore schematic sheet in exporter

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11488
This commit is contained in:
Sylwester Kocjan 2022-10-14 21:59:23 +02:00 committed by Jeff Young
parent 757c33ea13
commit d18d2eed51
1 changed files with 1 additions and 8 deletions

View File

@ -99,13 +99,9 @@ public:
m_schematic( aSchematic )
{
wxASSERT( aSchematic );
m_savedCurrentSheet = m_schematic->CurrentSheet();
}
virtual ~NETLIST_EXPORTER_BASE()
{
m_schematic->SetCurrentSheet( m_savedCurrentSheet );
}
virtual ~NETLIST_EXPORTER_BASE() = default;
/**
* Write to specified output file.
@ -210,9 +206,6 @@ protected:
/// The schematic we're generating a netlist for
SCHEMATIC_IFACE* m_schematic;
/// The schematic's CurrentSheet when we entered. Restore on exiting.
SCH_SHEET_PATH m_savedCurrentSheet;
};
#endif