Reset connection graph when loading new root sheet
This commit is contained in:
parent
ab07c852d0
commit
cc47082566
|
@ -55,6 +55,16 @@ void SCHEMATIC::Reset()
|
|||
}
|
||||
|
||||
|
||||
void SCHEMATIC::SetRoot( SCH_SHEET* aRootSheet )
|
||||
{
|
||||
wxCHECK_RET( aRootSheet, "Call to SetRoot with null SCH_SHEET!" );
|
||||
|
||||
m_rootSheet = aRootSheet;
|
||||
|
||||
m_connectionGraph->Reset();
|
||||
}
|
||||
|
||||
|
||||
SCH_SCREEN* SCHEMATIC::RootScreen() const
|
||||
{
|
||||
return IsValid() ? m_rootSheet->GetScreen() : nullptr;
|
||||
|
|
|
@ -106,10 +106,13 @@ public:
|
|||
return *m_rootSheet;
|
||||
}
|
||||
|
||||
void SetRoot( SCH_SHEET* aRootSheet )
|
||||
{
|
||||
m_rootSheet = aRootSheet;
|
||||
}
|
||||
/**
|
||||
* Initializes the schematic with a new root sheet.
|
||||
* This is typically done by calling a file loader that returns the new root sheet
|
||||
* As a side-effect, takes care of some post-load initialization.
|
||||
* @param aRootSheet is the new root sheet for this schematic.
|
||||
*/
|
||||
void SetRoot( SCH_SHEET* aRootSheet );
|
||||
|
||||
/// A simple test if the schematic is loaded, not a complete one
|
||||
bool IsValid() const
|
||||
|
|
Loading…
Reference in New Issue