Fix bug when entered group is immediate parent.

This commit is contained in:
Jeff Young 2020-09-25 22:14:22 +01:00
parent b4672c64ea
commit eb97fe8386
1 changed files with 1 additions and 1 deletions

View File

@ -1974,7 +1974,7 @@ PCB_GROUP* BOARD::TopLevelGroup( BOARD_ITEM* item, PCB_GROUP* scope )
while( candidate && candidate->GetParentGroup() && candidate->GetParentGroup() != scope )
candidate = candidate->GetParentGroup();
return candidate;
return candidate == scope ? nullptr : candidate;
}