Use resolved path when trying to load sheet content.
Also, if it can't be loaded then at least initialize it so that we don't crash later (trying to access a NULL screen). Fixes: lp:1841801 * https://bugs.launchpad.net/kicad/+bug/1841801
This commit is contained in:
parent
d2cd659471
commit
02a7a79e0d
|
@ -1051,7 +1051,8 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_frame->LoadSheetFromFile( sheet, g_CurrentSheet, sheet->GetFileName() );
|
if( !m_frame->LoadSheetFromFile( sheet, g_CurrentSheet, fn.GetFullPath() ) )
|
||||||
|
m_frame->InitSheet( sheet, sheet->GetFileName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue