Clear subshapes before using again on a different layer.

Fixes https://gitlab.com/kicad/code/kicad/issues/6248
This commit is contained in:
Jeff Young 2020-11-01 12:13:53 +00:00
parent 7676ba6f5d
commit d2befca5af
1 changed files with 1 additions and 0 deletions

View File

@ -92,6 +92,7 @@ public:
[&]( PCB_LAYER_ID layer )
{
std::shared_ptr<SHAPE> shape = aItem->GetEffectiveShape( layer );
subshapes.clear();
if( shape->HasIndexableSubshapes() )
shape->GetIndexableSubshapes( subshapes );