Commit Graph

7905 Commits

Author SHA1 Message Date
Seth Hillbrand 2bc8c0ace5 Fix Eeschema Find/Replace
Find/Replace skipped elements that were inside the same symbol,
preventing a full search of the schematic.
2023-03-09 11:51:29 -08:00
Wayne Stambaugh 9fdc1257a1 Fix broken update symbol from library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13782

(cherry picked from commit baeeeec492)
2023-02-05 11:01:29 -05:00
Wayne Stambaugh 95828ff2e2 Use references instead of copies in map pair for loops. 2023-02-03 10:04:08 -05:00
jean-pierre charras 98e55c0a04 Fix compatibility with older wxWidgets versions. 2023-02-02 20:38:51 +01:00
Wayne Stambaugh 2757d81231 Fix schematic update library symbols issues.
Rather than update library symbols one at a time, queue them up by
schematic symbol to prevent multiple updates to the same symbol in
complex hierarchies.  This also removes all of the library symbols
first which will clear out all of the library symbol variants that
were created by modifying library symbols in place and/or changes to
the symbol in the library.

Don't add new variant library symbol if an equivalent variant already
exists in the schematic local cache.  This prevents duplicate library
symbols from being added to the local cache when the first variant in
the cache does not match that of the symbol being added.
2023-02-02 12:54:08 -05:00
Seth Hillbrand a1ff9134f4 Don't double-tap Connectivity Recalculate
Cherry-picked from 43e4797d4d
2023-01-24 10:35:42 -08:00
Seth Hillbrand 4e34bdb621 Force realtime connectivity on
The pressure relief valve was not useful for common work patterns as it
forced the recalculation on many common actions such as bus expansion.
This caused it to actually feel slower than with the pressure relief
valve off.

For most schematics, realtime is now fast enough to not need the valve
and for those that are extremely complex, removing the valve helps this
run more predictably

(cherry picked from commit e6dbca051c)
2023-01-23 11:11:48 -08:00
Seth Hillbrand 6d96059917 Fix compile error 2023-01-23 10:47:23 -08:00
Seth Hillbrand 99cfa1fad7 Avoid the obsolete GetNextPin() call
This iterated over all pins to find the pin after a given item.  Because
out pattern is consistently to iterate in the outer loop, this means
that we were an O(n^2) loop for the pins just to find their names.  This
affected very large parts (e.g. FPGAs) when switching sheets to display

(cherry picked from commit 6fa2eedb4b)
2023-01-23 10:46:07 -08:00
Seth Hillbrand b2a6f12645 Don't do a full connection database reset on HardRedraw()
Only update the intersheet references to avoid the penalty of
connectivity re-calculations on each redraw

Cherry-picked from b8ee588a76 and 08c2828bd3
2023-01-23 10:28:29 -08:00
Wayne Stambaugh b33cf23bda Fix library symbol rescue issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13602

(cherry picked from commit 0a7bd85cd6)
2023-01-21 11:21:38 -05:00
Wayne Stambaugh 6ebd970f88 Fix broken graphics import file filters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13570

(cherry picked from commit f81642bbb3)
2023-01-17 11:27:25 -05:00
Seth Hillbrand 5e3b74aee5 Fix name escaping in Save As
Fixes https://gitlab.com/kicad/code/kicad/issues/13504
2023-01-12 13:34:14 -08:00
Jon Evans 5144186fca Fix c0fb041b for old API 2022-12-27 08:33:40 -05:00
Jon Evans c0fb041be6 No-connects might not be connected to a pin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13256

(cherry picked from commit 5657ca5a04)
2022-12-27 08:14:43 -05:00
Wayne Stambaugh 22bece0922 Schematic import bug fix.
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic.  This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic.  This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues.  This bug does not apply when opening
the full project.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11076

(cherry picked from commit 84f927d057)
2022-12-15 11:44:59 -05:00
Seth Hillbrand 948071183c Don't report a pin if the pin is null
The pins can exist on a different sheet from the no-connect.  In this
case, we do not set the ERC for the current sheet to the remote pins,
instead only link the NC

(cherry picked from commit bc8366cd95)
2022-12-12 19:31:20 -08:00
Seth Hillbrand 7f08356a48 Fix NC and label logic
Largely moved for v6 instead of direct cherry-pick due to code
differences

cherry-picked from eaf56bc05a
cherry-picked from 9a5df73060
2022-12-11 12:16:33 -08:00
Simon Schaak 045633626c Clean up autosave file handling edge cases
(cherry picked from commit bd74489b00)
2022-12-11 08:48:48 -05:00
Wayne Stambaugh 5de05312d5 Fix wxWidgets 3.2 assertion when opening symbol field table editor. 2022-12-09 15:05:38 -05:00
jean-pierre charras ecfd74c1be symbol_editor_control: fix incorrect bounding in SVG export.
Fixes #13093
https://gitlab.com/kicad/code/kicad/issues/13093
2022-12-07 13:18:10 +01:00
jean-pierre charras 46b3188737 Some fixes related to translated/not translated mandatory field names.
DIALOG_SYMBOL_FIELDS_TABLE: add new fields to symbols only if the field is not empty.

(cherry picked from commit 45b167dff5)
2022-11-30 11:41:08 -08:00
Seth Hillbrand f663b42d77 Remove unused vars 2022-11-30 11:26:48 -08:00
jean-pierre charras 9ac87132af Fix a few issues related to field names and their translation.
- Do not use translated field names outside strings displayed in dialogs.
- fix code that does not work well with default locale.
- fix some (not all) I18n issues in DIALOG_UPDATE_SYMBOL_FIELDS.

(cherry picked from commit 20d1d0705e)
2022-11-30 11:19:21 -08:00
Jeff Young 2dd04ea43a Protect move tool from re-entrancy.
m_dragInProgress is usually sufficient, except when we haven't started
one yet.  In any case, conflating the two is probably a bad idea.

Fixes https://gitlab.com/kicad/code/kicad/issues/12936

(cherry picked from commit bc271a8d15)
2022-11-29 23:16:48 +00:00
Jeff Young 27676f4388 Add mapping for -rescue.lib in project Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/12503

(cherry picked from commit 5366fa8cee)
2022-11-29 23:14:10 +00:00
Jeff Young ede21ed6ae Handle string escaping for Find/Replace in labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/12789

(cherry picked from commit ae9405a4d3)
2022-11-29 22:54:14 +00:00
Seth Hillbrand de05a513f3 Prevent mirror of text elements
While we never allow the creation of mirrored text elements in the
schematic and symbol library editors, external generation of symbols may
cause the property to be set, which can then never be changed.  This
leaves the property unset for all elements

Fixes https://gitlab.com/kicad/code/kicad/issues/13007

(cherry picked from commit f1556ed801)
2022-11-26 10:51:03 -08:00
Seth Hillbrand 3b3e86b968 Remove structured binding from v6 commit
C++17 is only for the master branch
2022-11-25 10:43:10 -08:00
Seth Hillbrand f6ca98061c Add terrible hack to get subgraph netname
In certain cases, the subgraph does not receive the proper netname,
preventing us from checking for correct pin counts.  This is a backwards
iteration of the net name <-> subgraph map to extract the proper name
and sibling subgraphs

Fixes https://gitlab.com/kicad/code/kicad/issues/12165

Fixes https://gitlab.com/kicad/code/kicad/issues/12814

(cherry picked from commit 938645b29d)
2022-11-25 08:51:12 -08:00
Wayne Stambaugh d9a1703bcc Fix broken schematic instance data loading legacy files (<=5.1). 2022-11-18 10:07:59 -05:00
Wayne Stambaugh a22c466639 Fix broken legacy schematic file save. 2022-11-17 12:23:14 -05:00
Jon Evans f81313068e ERC: Include power connections in multiple driver test
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12138


(cherry picked from commit 141c1f020e)
2022-10-28 02:55:42 +00:00
Jeff Young a5fd03df88 Don't delete pin out from under selection & move tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/12610

(cherry picked from commit 3cb6a80954)
2022-10-25 14:21:03 +01:00
Marek Roszko bce8c95647 Avoid netlist export dialog crash from trying to delete a non-custom format
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12229
2022-10-22 16:41:32 -04:00
Marek Roszko 4d729110d5 Fix build error due to C++17 use 2022-10-22 16:38:17 -04:00
jean-pierre charras 8e331628b6 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 15:38:26 +02:00
Mikolaj Wielgus ceaf3fc72d Ngspice: Preload a basically empty circuit to avoid error messages
Fixes https://gitlab.com/kicad/code/kicad/issues/12481

(cherry picked from commit 6e874f4c1e)
2022-10-21 09:22:53 -07:00
Seth Hillbrand b004d7a1cb Fix ERC global label unit tests
Need to test all units in the subgraph as there are chances that the
subgraph might have more than one label, which needs to be consistently
handled

(cherry picked from commit 60374daa49)
2022-10-21 09:17:11 -07:00
Seth Hillbrand f3ff9ddd31 Show ERC errors when any label only has 1 pin
To be connected, the label must have at least two pins on a subgraph
(or, in the case of a hierarchical label, two pins somewhere in its
connection)

Fixes https://gitlab.com/kicad/code/kicad/issues/7203

(cherry picked from commit 05cdf915d0)
2022-10-21 09:11:24 -07:00
jean-pierre charras e5fa18c9b1 fix an issue in a bom script (extra empty lines created)
Fixes #10473
https://gitlab.com/kicad/code/kicad/issues/10473

(cherry picked from commit 380cb452b2)
2022-10-21 09:10:30 -07:00
Seth Hillbrand 431aa88612 Allow printing backgrounds prior to foreground
Eeschema shows background fills on a different z-level than the rest of
the symbols/elements.  Print the backgrounds prior to the foregrounds in
order to preserve this view for print output

Fixes https://gitlab.com/kicad/code/kicad/issues/12559

(cherry picked from commit e055302a3c)
2022-10-21 09:00:13 -07:00
Seth Hillbrand af159c9841 Be sure to update UUID when placing new elements
Fixes https://gitlab.com/kicad/code/kicad/issues/12588

(cherry picked from commit a5da46459c)
2022-10-21 11:19:46 +01:00
Jeff Young da85a5f6bf Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552

(cherry picked from commit c0a666507c)
2022-10-19 12:56:17 +01:00
Seth Hillbrand 535982f245 Avoid scaling unity models
There is no benefit to applying the identity transformation to models
when exporting the board to STEP

Fixes https://gitlab.com/kicad/code/kicad/issues/12036

(cherry picked from commit 98431eed79)

Fixes https://gitlab.com/kicad/code/kicad/issues/10232
2022-10-14 13:08:13 -07:00
jean-pierre charras 95acc1bf33 Eeschema printing: fix some issues.
The offset setting was incorrect when using wxAffineMatrix2D.
It was visible when printing more than one sheet.
Note also when not using wxAffineMatrix2D, all pages must have the same orientation
(PORTRAIT/LANDSCAPE is not managed)
From master branch, commit 79c30180
2022-10-09 19:57:32 +02:00
jean-pierre charras 8dbfe79536 Symbol Editor: Fix reverting changes on a root symbol: derived symbols are displayed wrong
Reverting changes broke links between derived symbols and the root symbol.
Now fixed by do not delete and recreate reverted symbol.
From master, commit f5fd12c0
Fixes #10792
2022-10-08 16:15:16 +02:00
Jeff Young 22e9985f5d Use more basic strings which have already been translated. 2022-09-29 23:58:35 +01:00
Jeff Young 43f9863182 Copy field properly.
Offset for new parent, and set parent property.

Fixes https://gitlab.com/kicad/code/kicad/issues/12376

(cherry picked from commit 45fb0107a0)
2022-09-28 12:50:02 +01:00
Jeff Young bb7362ceba Don't allow a SaveAs to overwrite the root sheet.
Also prevents EESchema from loading sheets which recurse.

Fixes https://gitlab.com/kicad/code/kicad/issues/10872

(cherry picked from commit d030f03844)
2022-09-28 12:45:20 +01:00