router: fix regression in PNS_KICAD_IFACE treating newly created items as invisible (side effect = non-45 degree angles due to incorrect snapping)

This commit is contained in:
Tomasz Wlostowski 2020-02-29 20:41:31 +01:00
parent 6850067182
commit a28f58d14d
1 changed files with 3 additions and 1 deletions

View File

@ -1104,8 +1104,10 @@ bool PNS_KICAD_IFACE::IsAnyLayerVisible( const LAYER_RANGE& aLayer )
bool PNS_KICAD_IFACE::IsItemVisible( const PNS::ITEM* aItem )
{
// by default, all items are visible (new ones created by the router have parent == NULL as they have not been
// committed yet to the BOARD)
if( !m_view || !aItem->Parent() )
return false;
return true;
auto item = aItem->Parent();
bool isOnVisibleLayer = true;