Eeschema: fix assertion when duplicating a sheet.

The duplicate sheet code path assigned a SCH_SCREEN object instead of a
SCH_SHEET object as a parent.  A recently added assertion to check for
this did it's job.

Fixes https://gitlab.com/kicad/code/kicad/issues/4369
This commit is contained in:
Wayne Stambaugh 2020-05-08 14:57:44 -04:00
parent 62d72ae081
commit 1840fe351e
1 changed files with 1 additions and 1 deletions

View File

@ -806,7 +806,7 @@ int SCH_EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
nameField.SetText( candidateName );
sheet->SetParent( m_frame->GetScreen() );
sheet->SetParent( m_frame->GetCurrentSheet().Last() );
m_frame->AddToScreen( sheet );
copiedSheets = true;