Don't iterate through m_selection if deleting items from it
Use the copied container saved_selection instead Fixes https://gitlab.com/kicad/code/kicad/-/issues/8126
This commit is contained in:
parent
f21111fda6
commit
7d9ee76f64
|
@ -478,7 +478,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
EE_SELECTION saved_selection = m_selection;
|
||||
|
||||
for( const auto& item : m_selection )
|
||||
for( const auto& item : saved_selection )
|
||||
RemoveItemFromSel( item, true );
|
||||
|
||||
SelectPoint( evt->Position(), EE_COLLECTOR::AllItems, nullptr,
|
||||
|
|
Loading…
Reference in New Issue