Browse Source

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.
pull/17/head
Wayne Stambaugh 8 years ago
parent
commit
41c1657eb6
  1. 3
      eeschema/sch_legacy_plugin.cpp

3
eeschema/sch_legacy_plugin.cpp

@ -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

Loading…
Cancel
Save