Fix bug when entered group is immediate parent.
This commit is contained in:
parent
b4672c64ea
commit
eb97fe8386
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue