Ensure that the current copper zone is not first

The zeroth index is reserved especially for the <no net> tag, so we need
to keep the current net at 1 or greater to keep it connected.

Fixes: lp:1758488
* https://bugs.launchpad.net/kicad/+bug/1758488
This commit is contained in:
Seth Hillbrand 2018-03-23 20:37:32 -07:00
parent fb882633b2
commit f317b10adf
1 changed files with 3 additions and 2 deletions

View File

@ -662,8 +662,9 @@ void DIALOG_COPPER_ZONE::buildAvailableListOfNets()
if( wxNOT_FOUND == selectedNetListNdx )
{
// the currently selected net must *always* be visible.
listNetName.Insert( equipot->GetNetname(), 0 );
selectedNetListNdx = 0;
// <no net> is the zero'th index, so pick next lowest
listNetName.Insert( equipot->GetNetname(), 1 );
selectedNetListNdx = 1;
}
}
}