From 3600b2ce3f3932c346b6391a3018322da54dbaae Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 8 Feb 2022 17:09:17 +0000 Subject: [PATCH] Make sure temp sheet has a parent. --- eeschema/dialogs/dialog_sheet_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_sheet_properties.cpp b/eeschema/dialogs/dialog_sheet_properties.cpp index 2d7c5dd919..6a7d9cf1cd 100644 --- a/eeschema/dialogs/dialog_sheet_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_properties.cpp @@ -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(); + std::unique_ptr< SCH_SHEET> tmpSheet = std::make_unique( &m_frame->Schematic() ); tmpSheet->GetFields()[SHEETNAME] = m_fields->at( SHEETNAME ); tmpSheet->GetFields()[SHEETFILENAME].SetText( sheetFileName.GetFullPath() ); tmpSheet->SetScreen( useScreen );