Re-run autoplacement after symbol replacement (when appropriate).
Also prevents an internal wxWidgets assert by clearing grid selection before deleting rows. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15541
This commit is contained in:
parent
9b69d84688
commit
377ffb00b0
|
@ -705,6 +705,10 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( SCH_COMMIT* aCommit,
|
|||
|
||||
symbol->SetSchSymbolLibraryName( wxEmptyString );
|
||||
screen->Append( symbol );
|
||||
|
||||
if( resetPositions )
|
||||
symbol->AutoAutoplaceFields( screen );
|
||||
|
||||
frame->GetCanvas()->GetView()->Update( symbol );
|
||||
|
||||
msg = getSymbolReferences( *symbol, symbol_change_info.m_LibId );
|
||||
|
|
|
@ -543,6 +543,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnDeleteField( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
m_grid->CommitPendingChanges( true /* quiet mode */ );
|
||||
m_grid->ClearSelection();
|
||||
|
||||
// Reverse sort so deleting a row doesn't change the indexes of the other rows.
|
||||
selectedRows.Sort( []( int* first, int* second ) { return *second - *first; } );
|
||||
|
|
Loading…
Reference in New Issue