Eeschema: fix bug in sheet path loading logic.

When a relative sheet path was not in the project path or a subfolder
within the project path, the schematic path would be empty.  Set the
base path to the project path when the schematic path is no within
the project path hierarchy.
This commit is contained in:
Wayne Stambaugh 2018-04-22 09:47:54 -04:00
parent 4202bb6af6
commit 41c1657eb6
1 changed files with 3 additions and 0 deletions

View File

@ -605,6 +605,9 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::Load( const wxString& aFileName, KIWAY* aKiway,
m_path = aFileName.Left( aFileName.Length() - normedFn.GetFullPath().Length() );
}
if( m_path.IsEmpty() )
m_path = aKiway->Prj().GetProjectPath();
wxLogTrace( traceSchLegacyPlugin, "Normalized append path \"%s\".", m_path );
}
else