From 149ddf9ddba2080bcd03a78eba623c52e2fc07fb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Nov 2022 17:55:04 +0100 Subject: [PATCH] PANEL_SETUP_BUSES: make delete a bus member working. the member list was not updated when deleting a member. Fixes #13024 https://gitlab.com/kicad/code/kicad/issues/13024 --- eeschema/dialogs/panel_setup_buses.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eeschema/dialogs/panel_setup_buses.cpp b/eeschema/dialogs/panel_setup_buses.cpp index 18606bf9c9..4775737fed 100644 --- a/eeschema/dialogs/panel_setup_buses.cpp +++ b/eeschema/dialogs/panel_setup_buses.cpp @@ -229,6 +229,15 @@ void PANEL_SETUP_BUSES::OnRemoveMember( wxCommandEvent& aEvent ) m_membersGrid->DeleteRows( curRow, 1 ); + // Update the member list of the current bus alias from the members grid + const std::shared_ptr& alias = m_aliases[ m_lastAlias ]; + alias->Members().clear(); + + for( int ii = 0; ii < m_membersGrid->GetNumberRows(); ++ii ) + alias->Members().push_back( m_membersGrid->GetCellValue( ii, 0 ) ); + + m_membersGridDirty = true; + if( m_membersGrid->GetNumberRows() > 0 ) { m_membersGrid->MakeCellVisible( std::max( 0, curRow-1 ), 0 );