Clear flags after we're done with them
The CANDIDATE flag is a temporary element that should not be maintained outside of the routine in which is it temporarily set Fixes https://gitlab.com/kicad/code/kicad/issues/11361
This commit is contained in:
parent
65f7d9f97a
commit
250a246761
|
@ -1240,6 +1240,7 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
// Build lists of nearby items and their children
|
||||
std::vector<EDA_ITEM*> nearbyItems;
|
||||
std::vector<EDA_ITEM*> nearbyChildren;
|
||||
std::vector<EDA_ITEM*> flaggedItems;
|
||||
|
||||
for( KIGFX::VIEW::LAYER_ITEM_PAIR& pair : nearbyViewItems )
|
||||
{
|
||||
|
@ -1313,6 +1314,7 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
if( Selectable( item ) && item->HitTest( selectionRect, isWindowSelection ) )
|
||||
{
|
||||
item->SetFlags( CANDIDATE );
|
||||
flaggedItems.push_back( item );
|
||||
selectItem( item );
|
||||
}
|
||||
}
|
||||
|
@ -1327,6 +1329,9 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
}
|
||||
}
|
||||
|
||||
for( EDA_ITEM* item : flaggedItems )
|
||||
item->ClearFlags( CANDIDATE );
|
||||
|
||||
m_selection.SetIsHover( false );
|
||||
|
||||
// Inform other potentially interested tools
|
||||
|
|
Loading…
Reference in New Issue