pcbnew: Fix loop condition when unhighlighting modules
Text can be included in the same selection group as the parent module. Thus if we clear the selection marker on a module's child elements we also need to remove the element from the selection group. Fixes: lp:1789418 * https://bugs.launchpad.net/kicad/+bug/1789418
This commit is contained in:
parent
01acc0d9be
commit
d45946396c
|
@ -1844,10 +1844,11 @@ void SELECTION_TOOL::unhighlight( BOARD_ITEM* aItem, int aMode, SELECTION& aGrou
|
|||
if( aMode == SELECTED )
|
||||
item->ClearSelected();
|
||||
else if( aMode == BRIGHTENED )
|
||||
{
|
||||
item->ClearBrightened();
|
||||
aGroup.Remove( item );
|
||||
}
|
||||
|
||||
// N.B. if we clear the selection flag for sub-elements, we need to also
|
||||
// remove the element from the selection group (if it exists)
|
||||
aGroup.Remove( item );
|
||||
view()->Hide( item, false );
|
||||
view()->Update( item );
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue