Repair connectivity if bus aliases changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16503
This commit is contained in:
parent
b77709bb4d
commit
94cb00392e
|
@ -79,6 +79,15 @@ bool SCH_EDIT_FRAME::LoadProjectSettings()
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
||||||
{
|
{
|
||||||
|
SCH_SCREENS screens( Schematic().Root() );
|
||||||
|
std::vector<std::shared_ptr<BUS_ALIAS>> oldAliases;
|
||||||
|
|
||||||
|
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||||
|
{
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& alias : screen->GetBusAliases() )
|
||||||
|
oldAliases.push_back( alias );
|
||||||
|
}
|
||||||
|
|
||||||
DIALOG_SCHEMATIC_SETUP dlg( this );
|
DIALOG_SCHEMATIC_SETUP dlg( this );
|
||||||
|
|
||||||
if( !aInitialPage.IsEmpty() )
|
if( !aInitialPage.IsEmpty() )
|
||||||
|
@ -104,6 +113,18 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
||||||
|
|
||||||
GetCanvas()->GetView()->MarkDirty();
|
GetCanvas()->GetView()->MarkDirty();
|
||||||
GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
||||||
|
|
||||||
|
std::vector<std::shared_ptr<BUS_ALIAS>> newAliases;
|
||||||
|
|
||||||
|
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||||
|
{
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& alias : screen->GetBusAliases() )
|
||||||
|
newAliases.push_back( alias );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( oldAliases != newAliases )
|
||||||
|
RecalculateConnections( nullptr, GLOBAL_CLEANUP );
|
||||||
|
|
||||||
RefreshOperatingPointDisplay();
|
RefreshOperatingPointDisplay();
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue