Push current sheet handling to SCHEMATIC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4803
This commit is contained in:
parent
06599d8d46
commit
04a51a5ba4
|
@ -340,8 +340,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
{
|
||||
Schematic().SetRoot( pi->Load( fullFileName, &Schematic() ) );
|
||||
|
||||
GetCurrentSheet().push_back( &Schematic().Root() );
|
||||
|
||||
if( !pi->GetError().IsEmpty() )
|
||||
{
|
||||
DisplayErrorMessage( this,
|
||||
|
@ -810,7 +808,6 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
|||
newfilename.SetName( Prj().GetProjectName() );
|
||||
newfilename.SetExt( LegacySchematicFileExtension );
|
||||
|
||||
GetCurrentSheet().push_back( &Schematic().Root() );
|
||||
SetScreen( GetCurrentSheet().LastScreen() );
|
||||
|
||||
Schematic().Root().SetFileName( newfilename.GetFullPath() );
|
||||
|
|
|
@ -436,8 +436,6 @@ void SCH_EDIT_FRAME::CreateScreens()
|
|||
|
||||
m_schematic->RootScreen()->SetFileName( wxEmptyString );
|
||||
|
||||
GetCurrentSheet().push_back( &m_schematic->Root() );
|
||||
|
||||
if( GetScreen() == NULL )
|
||||
{
|
||||
SCH_SCREEN* screen = new SCH_SCREEN( m_schematic );
|
||||
|
|
|
@ -115,6 +115,9 @@ void SCHEMATIC::SetRoot( SCH_SHEET* aRootSheet )
|
|||
|
||||
m_rootSheet = aRootSheet;
|
||||
|
||||
m_currentSheet->clear();
|
||||
m_currentSheet->push_back( m_rootSheet );
|
||||
|
||||
m_connectionGraph->Reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue