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:
parent
62d72ae081
commit
1840fe351e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue