Ensure pasted sheets get parents set properly for screen discovery

Fixes: lp:1831460
* https://bugs.launchpad.net/kicad/+bug/1831460
This commit is contained in:
Jon Evans 2019-06-03 20:30:14 -04:00
parent 1bf04d1722
commit 1721cc1700
1 changed files with 2 additions and 0 deletions

View File

@ -997,6 +997,8 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
sheet->SetName( wxString::Format( wxT( "sheet%8.8lX" ), (unsigned long)uid ) );
sheet->SetTimeStamp( uid );
sheet->SetParent( g_CurrentSheet->Last() );
sheet->SetScreen( nullptr );
sheetsPasted = true;
}
}