Fix a couple of bugs in the CurrentSheet architecture.
This commit is contained in:
parent
5bc6389477
commit
ec6c1b80b7
|
@ -471,6 +471,10 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
sheetList.UpdateSymbolInstances( Schematic().RootScreen()->m_symbolInstances );
|
sheetList.UpdateSymbolInstances( Schematic().RootScreen()->m_symbolInstances );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SCH_SHEET_PATH root;
|
||||||
|
root.push_back( &Schematic().Root() );
|
||||||
|
SetCurrentSheet( root );
|
||||||
|
|
||||||
Schematic().ConnectionGraph()->Reset();
|
Schematic().ConnectionGraph()->Reset();
|
||||||
|
|
||||||
SetScreen( GetCurrentSheet().LastScreen() );
|
SetScreen( GetCurrentSheet().LastScreen() );
|
||||||
|
|
|
@ -1093,7 +1093,7 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents() const
|
||||||
void SCH_EDIT_FRAME::FixupJunctions()
|
void SCH_EDIT_FRAME::FixupJunctions()
|
||||||
{
|
{
|
||||||
// Save the current sheet, to retrieve it later
|
// Save the current sheet, to retrieve it later
|
||||||
auto currSheet = GetCurrentSheet();
|
SCH_SHEET_PATH oldsheetpath = GetCurrentSheet();
|
||||||
|
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
|
||||||
|
@ -1134,7 +1134,7 @@ void SCH_EDIT_FRAME::FixupJunctions()
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
// Reselect the initial sheet:
|
// Reselect the initial sheet:
|
||||||
SetCurrentSheet( currSheet );
|
SetCurrentSheet( oldsheetpath );
|
||||||
GetCurrentSheet().UpdateAllScreenReferences();
|
GetCurrentSheet().UpdateAllScreenReferences();
|
||||||
SetScreen( GetCurrentSheet().LastScreen() );
|
SetScreen( GetCurrentSheet().LastScreen() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue