Fix bug in pruning of selection.
Fixes: lp:1770939 * https://bugs.launchpad.net/kicad/+bug/1770939
This commit is contained in:
parent
c30dd24cc1
commit
a9dc417319
|
@ -382,8 +382,7 @@ SELECTION& SELECTION_TOOL::RequestSelection( int aFlags, CLIENT_SELECTION_FILTER
|
|||
m_selection.ClearReferencePoint();
|
||||
}
|
||||
|
||||
// Be careful with iterators: items can be removed from list
|
||||
// that invalidate iterators.
|
||||
// Be careful with iterators: items can be removed from list that invalidate iterators.
|
||||
for( unsigned ii = 0; ii < m_selection.GetSize(); ii++ )
|
||||
{
|
||||
EDA_ITEM* item = m_selection[ii];
|
||||
|
@ -391,6 +390,9 @@ SELECTION& SELECTION_TOOL::RequestSelection( int aFlags, CLIENT_SELECTION_FILTER
|
|||
if( ( aFlags & SELECTION_EDITABLE ) && item->Type() == PCB_MARKER_T )
|
||||
{
|
||||
unselect( static_cast<BOARD_ITEM *>( item ) );
|
||||
|
||||
// unselect() removed the item from list. Back up to catch the following item.
|
||||
ii--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue