From 41c1657eb62267e28e481647faadeff0a89b8837 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 22 Apr 2018 09:47:54 -0400 Subject: [PATCH] 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. --- eeschema/sch_legacy_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 268ce4d120..a5008d7d09 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/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