Eeschema: fix assertion creating a new sheet.

Fixes https://gitlab.com/kicad/code/kicad/issues/6722
This commit is contained in:
Wayne Stambaugh 2020-12-16 16:21:15 -05:00
parent 9de0846f3e
commit fd79c7ae46
1 changed files with 1 additions and 1 deletions

View File

@ -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().