From f317b10adf177f12476edd471b5042ebe2409ddb Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 23 Mar 2018 20:37:32 -0700 Subject: [PATCH] Ensure that the current copper zone is not first The zeroth index is reserved especially for the 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 --- pcbnew/dialogs/dialog_copper_zones.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index db10961e5e..8a8e0844f1 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -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; + // is the zero'th index, so pick next lowest + listNetName.Insert( equipot->GetNetname(), 1 ); + selectedNetListNdx = 1; } } }