230 Commits

Author SHA1 Message Date
Mark Roszko
70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
Jeff Young
836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Seth Hillbrand
6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
jean-pierre charras
03611f7bb7 missing change 2020-01-09 09:14:04 +01:00
jean-pierre charras
c17c9960d8 Eeschema: fix a colliding name between sch_text.h and a Windows/msys2 header.
"INPUT" declaration in sch_text.h generate *a lot of* compil warnings.
So it is replaced by PS_INPUT.
For consistency, others member of enum class PINSHEETLABEL_SHAPE are also renamed.
2020-01-09 08:52:30 +01:00
Mark Roszko
ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Jon Evans
b4cc28a5b6 Fix memory leaks in CONNECTION_GRAPH
Fixes #3692
2020-01-07 00:13:19 -05:00
Jon Evans
856decc29b Fix a few issues with bus member propagation to subsheets
Fixes #3728
2020-01-04 10:38:50 -05:00
Jon Evans
1bffe7f48b Ensure power pins win over bus member renaming
Also switch to a scoped enum for PRIORITY

Fixes https://gitlab.com/kicad/code/kicad/issues/3728
2020-01-02 22:09:15 -05:00
jean-pierre charras
034b87dec0 Eeschema: connection_graph.cpp: clear old pointers to avoid using outdated or deleted data.
m_connected_bus_item and m_connected_bus_items pointers were not cleared when
rebuilding connection data.
So in some cases these pointers were not updated, and created a crash
once the old data was no longer available (deleted)
2019-12-23 14:55:47 +01:00
jean-pierre charras
7b80b2dc7b Eeschema: fix a crash that sometimes happens with bus entries,
connected to the same point on a bus.
The pointers used in previous code could be null, but they were not tested.
The pointer validity is now tested.
2019-12-22 16:19:05 +01:00
Mark Roszko
11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jon Evans
8b87dc7e0f A slightly better ERC check for hierarchical labels
Fixes: lp:1839822
* https://bugs.launchpad.net/kicad/+bug/1839822
2019-11-29 21:11:44 -05:00
Jeff Young
56bf72cc5d OpenGL context must be saved/restored around a translation.
Also includes a bunch of code cleanup.

Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-07 19:25:03 +01:00
Jeff Young
fb1d7811b1 Internal netnames must be used internally.
GetShownNetname() is only for the GUI, or for external programs.

Fixes: lp:1834510
* https://bugs.launchpad.net/kicad/+bug/1834510
2019-08-03 21:35:55 -06:00
Jon Evans
ab766e6c1c Don't absorb neighbors based on weak component pins
Fixes: lp:1838140
* https://bugs.launchpad.net/kicad/+bug/1838140
2019-07-27 11:29:11 -04:00
Jon Evans
b99c71744f Properly handle nested bus absorption 2019-07-27 10:51:38 -04:00
Jon Evans
607650be22 Connectivity: don't consider neighbor propagation when types don't match
Fixes: lp:1831608
* https://bugs.launchpad.net/kicad/+bug/1831608
2019-06-05 22:26:44 -04:00
Jon Evans
42887544c9 Connectivity: ensure globally-labeled buses are always propagated
Fixes: lp:1822964
* https://bugs.launchpad.net/kicad/+bug/1822964
2019-06-05 21:33:20 -04:00
Jon Evans
8d8c743f97 Connectivity: remove unused method 2019-06-05 21:27:56 -04:00
Jon Evans
256d7b0714 ERC: Use local paths for bus<>bus entry testing
Fixes: lp:1831365
* https://bugs.launchpad.net/kicad/+bug/1831365
2019-06-02 11:34:15 -04:00
Jon Evans
27a2b840ec Eeschema: Fix multiple net label ERC after sorting changes
Fixes: lp:1831003
* https://bugs.launchpad.net/kicad/+bug/1831003
2019-05-31 21:55:54 -04:00
Jon Evans
4e6c9ac7b1 Remove defunct junction code that left some isolated
Fixes: lp:1828716
* https://bugs.launchpad.net/kicad/+bug/1828716
2019-05-23 22:58:46 -04:00
Jon Evans
ee095a6711 Make sure secondary drivers are followed-up on after absorption 2019-05-12 20:23:16 -04:00
Jon Evans
019f63cd95 Don't merge subgraphs by matching sheet pin names 2019-05-12 18:41:04 -04:00
Jon Evans
1de5b83d82 Promote net names to higher in hierarchy when possible 2019-05-07 21:59:36 -04:00
Jon Evans
81993eef83 Ensure bus member links get updated in hierarchical situations 2019-05-07 21:31:53 -04:00
Jon Evans
3d3c280f22 Fix hierarchical linking if parent sheet has a weak driver 2019-05-07 21:31:53 -04:00
Jon Evans
316be464ab Handle higher-priority connection drivers located in subsheets
Fixes: lp:1827850
* https://bugs.launchpad.net/kicad/+bug/1827850
2019-05-06 22:09:05 -04:00
Jon Evans
09c9db472e Properly handle buses that have been linked by net wires only
Fixes: lp:1825532
* https://bugs.launchpad.net/kicad/+bug/1825532
2019-05-05 19:48:55 -04:00
Jon Evans
e9eacbc91c Ensure subgraphs with multiple labels get sorted 2019-05-05 19:09:05 -04:00
Jon Evans
019a731e03 Back-propagate from child sheets when two parents point to one child 2019-05-05 16:05:36 -04:00
Jon Evans
6d918ea1f1 A few fixes and refactors to connectivity propagation 2019-05-05 00:03:58 -04:00
Jon Evans
2f2d48938e Ensure connection sheet is properly reset at reinit time 2019-05-04 22:23:35 -04:00
Jon Evans
efa0c97da9 Make sure net name prefixes carry through to netlist 2019-05-01 20:48:27 -04:00
Jon Evans
4efed8a4dd Ensure global labels get flagged as lonely in all circumstances
Fixes: lp:1827214
* https://bugs.launchpad.net/kicad/+bug/1827214
2019-05-01 20:15:21 -04:00
Jon Evans
a5a2152ff4 Cache subgraphs by sheet path 2019-04-29 19:58:02 -04:00
Jon Evans
c054944d67 Set real-time connectivity to on by default with a safety valve 2019-04-29 18:59:32 -04:00
Jon Evans
0ce32f7be1 Remove UpdatePins call from connectivity calculation 2019-04-25 15:32:51 -04:00
Jon Evans
098102220e Fix detection of lonely local labels 2019-04-25 15:31:44 -04:00
Jon Evans
f0376f1379 Improve ERC checking of labels
Fixes: lp:1824629
* https://bugs.launchpad.net/kicad/+bug/1824629
2019-04-25 15:10:39 -04:00
Jon Evans
e06d37090a A few connectivity performance tweaks 2019-04-25 00:37:10 -04:00
Jon Evans
ed27c50692 Improve handling of non-unique connections 2019-04-24 23:47:57 -04:00
Jon Evans
ff6a8cd537 Revert "Remove UpdatePins call from connectivity calculation"
This reverts commit b351e70d13acbdec69fc4cf0900a8c0e42d3f4c8.

Causes crashes on entering subsheets; don't have time to debug yet
2019-04-22 23:31:11 -04:00
Jon Evans
b351e70d13 Remove UpdatePins call from connectivity calculation 2019-04-22 22:49:24 -04:00
Jeff Young
5e2cf51309 Improve robustness of SCH_PIN storage architecture.
In particular, allow short-term storage of pointers to SCH_PINs.
2019-04-22 11:19:43 +01:00
Jon Evans
e2c12d8c25 Overhaul connectivity neighbor and global connection processing 2019-04-21 19:10:44 -04:00
Jon Evans
a92bb94612 Ignore multiple identical bus labels
Fixes: lp:1825560
* https://bugs.launchpad.net/kicad/+bug/1825560
2019-04-19 22:03:22 -04:00
Jeff Young
460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
jean-pierre charras
2529346940 Some fixes for I18N. Mainly do not translate debug messages or strings giving only a print format (like "%d"). 2019-04-13 10:12:24 +02:00