Commit Graph

2 Commits

Author SHA1 Message Date
John Beard edc73de023 Pcbnew: ignore start values in "first available" grid numbering
The using the "first available" numbering option, force an
artifical linear numbering scheme starting at '1'.

Start the pad name provider at the 0'th pad index.

Also adds a few related tests and adjusts tests affected by
this change to reflect that the offset still applies.

This can be expanded in future to be more general by skipping
pad (which would allow a custom start and numbering scheme
while still avoiding duplication), but for now,
this does what the UI says and avoids string changes in 5.1rc.

Fixes: lp:1814918
* https://bugs.launchpad.net/kicad/+bug/1814918

Fixes: lp:1814917
* https://bugs.launchpad.net/kicad/+bug/1814917
2019-02-08 12:15:02 +00:00
John Beard 453a91f661 Pcbnew: arrays skip existing names
The current module cannot be queried for existing pads as we
add them (because we never commit, until we finish the whole array).

Instead, pre-gather the names and check as we add, skipping any existing
names.

Note: this will not prevent arrays becoming "mis-ordered", but there
is not a lot we can do to prevent all possible errors.

Fixes: 1808706
* https://bugs.launchpad.net/kicad/+bug/1808706

The same principle could be used to skip existing ref-des'es on PCBs.
2019-01-30 15:41:35 -08:00