From fd79c7ae46a3a9cbdc1027164ddb086fe5b18db0 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 16 Dec 2020 16:21:15 -0500 Subject: [PATCH] Eeschema: fix assertion creating a new sheet. Fixes https://gitlab.com/kicad/code/kicad/issues/6722 --- eeschema/sheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 4f3b413435..229c2717c4 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -880,7 +880,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC ) sheet->SetFlags( IS_NEW | IS_RESIZED ); sheet->SetTimeStamp( GetNewTimeStamp() ); - sheet->SetParent( GetScreen() ); + sheet->SetParent( GetCurrentSheet().Last() ); sheet->SetScreen( NULL ); // need to check if this is being added to the GetDrawItems().