Don't leave selection lying around when swapping out footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14971
(cherry picked from commit da558f57d4
)
This commit is contained in:
parent
d3099ecf75
commit
61dfe4ef07
|
@ -1238,6 +1238,9 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode )
|
|||
setCurFootprintName( m_fpList->GetBaseString( selection ) );
|
||||
|
||||
// Delete the current footprint
|
||||
if( PCB_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<PCB_SELECTION_TOOL>() )
|
||||
selectionTool->ClearSelection( true /* quiet mode */ );
|
||||
|
||||
GetBoard()->DeleteAllFootprints();
|
||||
GetBoard()->GetNetInfo().RemoveUnusedNets();
|
||||
|
||||
|
|
Loading…
Reference in New Issue