Try to resolve worksheet filename before saving it

The new code was added to handle saving imported worksheets,
but it is possible to specify relative paths to worksheets
not only to the project folder but also to the global
templates directories.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13834
This commit is contained in:
Jon Evans 2023-02-11 10:33:23 -05:00
parent 6948a0bebd
commit a6776edc26
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ void SCH_EDIT_FRAME::SaveProjectSettings()
if( !BASE_SCREEN::m_DrawingSheetFileName.IsEmpty() )
{
wxFileName layoutfn( BASE_SCREEN::m_DrawingSheetFileName );
wxFileName layoutfn( DS_DATA_MODEL::ResolvePath( BASE_SCREEN::m_DrawingSheetFileName,
Prj().GetProjectPath() ) );
bool success = true;