Make sure temp sheet has a parent.

This commit is contained in:
Jeff Young 2022-02-08 17:09:17 +00:00
parent f2440978ec
commit 3600b2ce3f
1 changed files with 1 additions and 1 deletions

View File

@ -594,7 +594,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
if( useScreen )
{
// Create a temporary sheet for recursion testing to prevent a possible recursion error.
std::unique_ptr< SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>();
std::unique_ptr< SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>( &m_frame->Schematic() );
tmpSheet->GetFields()[SHEETNAME] = m_fields->at( SHEETNAME );
tmpSheet->GetFields()[SHEETFILENAME].SetText( sheetFileName.GetFullPath() );
tmpSheet->SetScreen( useScreen );