Initialize newly imported files with current schematic extension.

Fixes https://gitlab.com/kicad/code/kicad/issues/6083
This commit is contained in:
Jeff Young 2020-11-05 23:24:29 +00:00
parent 44400ca413
commit 3630f32c26
3 changed files with 3 additions and 3 deletions

View File

@ -156,7 +156,8 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
{
wxASSERT( !aFileName || aSchematic != NULL );
m_filename = aFileName;
wxFileName fileName( aFileName );
fileName.SetExt( ".kicad_sch" );
m_schematic = aSchematic;
// Delete on exception, if I own m_rootSheet, according to aAppendToMe

View File

@ -136,7 +136,6 @@ private:
private:
SCH_SHEET* m_rootSheet; // The root sheet of the schematic being loaded..
SCH_SHEET* m_currentSheet; // The current sheet of the schematic being loaded..
wxFileName m_filename;
SCHEMATIC* m_schematic; // Passed to Load(), the schematic object being loaded
wxString m_libName; // Library name to save symbols

View File

@ -712,7 +712,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
ReplaceIllegalFileNameChars( &filename );
replace( filename.begin(), filename.end(), ' ', '_' );
wxString fn = wxString( filename + ".sch" );
wxString fn = wxString( filename + ".kicad_sch" );
filenameField.SetText( fn );
wxFileName fileName( fn );
m_currentSheet->GetScreen()->SetFileName( fileName.GetFullPath() );