Fix initialization of schematic in legacy plugin
This commit is contained in:
parent
4efed4b729
commit
14773d073d
|
@ -596,8 +596,6 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::Load( const wxString& aFileName, KIWAY* aKiway, SC
|
||||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||||
SCH_SHEET* sheet;
|
SCH_SHEET* sheet;
|
||||||
|
|
||||||
m_schematic = aSchematic;
|
|
||||||
|
|
||||||
wxFileName fn = aFileName;
|
wxFileName fn = aFileName;
|
||||||
|
|
||||||
// Unfortunately child sheet file names the legacy schematic file format are not fully
|
// Unfortunately child sheet file names the legacy schematic file format are not fully
|
||||||
|
@ -631,6 +629,8 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::Load( const wxString& aFileName, KIWAY* aKiway, SC
|
||||||
m_currentPath.push( m_path );
|
m_currentPath.push( m_path );
|
||||||
init( aKiway, aProperties );
|
init( aKiway, aProperties );
|
||||||
|
|
||||||
|
m_schematic = aSchematic;
|
||||||
|
|
||||||
if( aAppendToMe == NULL )
|
if( aAppendToMe == NULL )
|
||||||
{
|
{
|
||||||
// Clean up any allocated memory if an exception occurs loading the schematic.
|
// Clean up any allocated memory if an exception occurs loading the schematic.
|
||||||
|
|
Loading…
Reference in New Issue