Jeff Young
71eefc8322
Don't force user to be overly pedantic when writing diffpair rules.
...
(cherry picked from commit fe7e72538e
)
2022-02-15 20:57:45 +00:00
jean-pierre charras
35968dfe18
DIALOG_PLOT: use a short living quasimodal dialog instead of a long living window.
...
In this case, a quasimodal dialog is the right way.
From master branch, commit 43f5a7c74
2022-02-15 09:24:16 +01:00
Seth Hillbrand
6147e997ff
Format string for translation
2022-02-14 09:17:53 -08:00
jean-pierre charras
54a3ca06c0
Pcbnew, DIALOG_GRAPHIC_ITEM_PROPERTIES: fix incorrect test for arcs.
...
It was due to mixing decidegrees and degrees, and seen for 180 deg arcs
Fixes #10841
https://gitlab.com/kicad/code/kicad/issues/10841
2022-02-14 09:46:57 +01:00
jean-pierre charras
0cb82a0985
Import netlist: fix issues: do not read netlist before it is selected.
...
Now the netlist must be explicitly selected and read instead of beeing
read during dialog creation.
It also avoid a useless netlist read when closing the dialog or trying
to change the netlist filename.
From master branch
2022-02-14 08:37:53 +01:00
Graham Keeth
30276fb5f7
update custom rule syntax help to make diff pair rule examples clearer
...
(cherry picked from commit 4442f76add
)
2022-02-13 20:15:47 +00:00
Jeff Young
f37531ed39
Fix repaints getting done after the wrong dialog.
...
(cherry picked from commit b7c9a1ad55
)
2022-02-13 18:37:44 +00:00
Jeff Young
fd4ac7c5df
Error messages for zone merging.
...
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.
Also fixes a bug where undo would not be handled correctly when zones
could not be merged.
Fixes https://gitlab.com/kicad/code/kicad/issues/10466
(cherry picked from commit d5a2059c21
)
2022-02-13 18:30:32 +00:00
Jeff Young
f561f85ebb
Move CN_VISITOR from HitTest() to Collide().
...
The former isn't sufficiently aware of layer differences (such as for
pads with some layers unflashed).
(cherry picked from commit 6e063247e5
)
2022-02-13 18:22:18 +00:00
Jeff Young
7cba8e847d
Don't use bounding box cache during insideArea.
...
For starters we can't rely on it having been updated, but we also
cache the entire result so there's no huge cost-savings anyway.
Fixes https://gitlab.com/kicad/code/kicad/issues/10821
(cherry picked from commit 8dcc933fc3
)
2022-02-13 18:20:31 +00:00
木 王
7c910c2d0b
fix-npth
2022-02-12 11:56:46 +01:00
Seth Hillbrand
861589d837
Use wxEmptyString instead of wxT( "" )
...
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Seth Hillbrand
8fc831cbc2
Validate arc output when editing
...
Handles checking output of the arc to ensure we don't end up generating
an invalid arc. Also keeps the limit of the arc angle to be (360,360)
excluding 0.
Fixes https://gitlab.com/kicad/code/kicad/issues/10070
2022-02-06 17:18:04 -08:00
Jeff Young
3af606a020
Wide string decls for gerbview.
2022-02-05 19:59:29 +00:00
Roberto Fernandez Bautista
f412d8d461
CADSTAR: Fix potential nullptr dereferencing bug
...
Don't assume the footprint will have the pad index that the file references.
2022-02-05 19:22:05 +00:00
Marek Roszko
71bcc9883a
Fix typoed test condition for TH no hole pads PVS V501
...
(cherry picked from commit b9f1aaf029
)
2022-02-05 18:32:08 +00:00
Marek Roszko
be958e3fdb
Avoid potential divide by zero in footprint spreading PVS V609
...
(cherry picked from commit 8588bea4b2
)
2022-02-05 18:31:00 +00:00
Marek Roszko
b2c99dd953
Fix some leaking objects identified by PVS Studio V773
...
(cherry picked from commit a7ebfc31f9
)
2022-02-05 18:30:24 +00:00
Jeff Young
471c0c4c1d
More wide-string declarations.
2022-02-05 13:29:00 +00:00
Jeff Young
9e5e46514d
More wide-string declarations.
2022-02-05 13:29:00 +00:00
jean-pierre charras
ba70f202ce
Fix a compil issue.
2022-02-05 11:16:56 +01:00
Jeff Young
4657614e4f
More wxString wide literals.
2022-02-04 23:12:09 +00:00
Jeff Young
2365c1e96f
Add duplicated items to parent group.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10155
(cherry picked from commit 42917874dd
)
2022-02-04 18:14:25 +00:00
Jeff Young
430c4862b6
Log an undo item when filling zones.
...
If we wanted to put it into the parent's undo item, then the *parent*
would need to not start a new undo record. Not starting one in the
zone filler tries to add it to the *previous* change, not to the parent
change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10091
(cherry picked from commit 4cc1ced2f3
)
2022-02-04 18:14:25 +00:00
Seth Hillbrand
4c81307391
Allow dialogs to force evaluation of UNIT_BINDER
...
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)
Fixes https://gitlab.com/kicad/code/kicad/issues/10752
2022-02-04 10:03:23 -08:00
Marek Roszko
50d3a507d0
Mark some limits as constexpr
...
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime
(cherry picked from commit ca7840334c
)
2022-02-04 12:50:54 +00:00
Jeff Young
69b69aa431
Update text variables when they change.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 00:34:20 +00:00
Seth Hillbrand
0a13f15a9d
Ensure we can version scripting properly
...
Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window
Fixes https://gitlab.com/kicad/code/kicad/issues/10079
2022-02-03 15:54:07 -08:00
Seth Hillbrand
ef94f31204
Update error message to match new arc dialog
...
We now provide arc end points and interior angle, so we cannot check for
null radius in the same fashion. Instead, the starpoint==endpoint
indicates a zero radius
Fixes https://gitlab.com/kicad/code/kicad/issues/10714
2022-02-03 14:31:58 -08:00
Seth Hillbrand
7601a3385f
Convert strings to wide when using wxString routines
...
WxString does not allocate space for wide strings needed during
conversion unless the string is explicitly wide. This can cause buffer
over/underflow
Fixes https://gitlab.com/kicad/code/kicad/issues/10605
2022-02-03 13:08:07 -08:00
Seth Hillbrand
901685f01b
Don't convert KIID on the fly
...
Converting to string on save prevent unneeded ops
2022-02-03 10:34:14 -08:00
Jeff Young
b883eee911
Use superclass's copy c'tor from within subclass copy c'tor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10481
(cherry picked from commit 8c758aeeb5
)
2022-02-03 15:00:39 +00:00
Jeff Young
2425444947
Map zone layers before checking their visibility.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10509
(cherry picked from commit 09d0f6e17c
)
2022-02-03 15:00:39 +00:00
Jeff Young
66e12af548
Expand text vars in titleblock before exporting.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10197
(cherry picked from commit 407660201e
)
2022-02-03 15:00:39 +00:00
Jeff Young
ea38056e33
Resolve textvars in plot directory.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10405
(cherry picked from commit e5d5ee07f0
)
2022-02-03 15:00:39 +00:00
Jeff Young
c805144c08
Support (and save/recall) zoom in/out in Custom Rules editor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
(cherry picked from commit 0036f44e37
)
2022-02-03 15:00:39 +00:00
Seth Hillbrand
6d84acfacd
Handle invalid pads more gracefully
...
Pads generated outside of KiCad may have self-intersecting polygons that
simplify to multiple sets. We handle this by adding multiple primitives
for such polygons and limiting our fracture calls to only polygons that
have holes
Fixes https://gitlab.com/kicad/code/kicad/issues/10712
2022-02-02 13:36:24 -08:00
Steffen Mauch
169881dcf1
EAGLE plugin: use specified RATIO value for text size calculation
...
(cherry picked from commit 61b2b0ff0c
)
2022-02-02 08:48:25 -08:00
jean-pierre charras
3d11ce5139
export D356 netlist: fix incorrect id for pads type connectors.
...
these pads are similar to SMD pads and should have the same id.
Fixes #10694
https://gitlab.com/kicad/code/kicad/issues/10694
2022-02-01 08:45:02 +01:00
Seth Hillbrand
833ce19221
Be more diligent in preventing drag line errors
...
They can happen even when there are no collisions, so we need to reset
the 'ok' flag before using the line again.
Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-31 16:09:14 -08:00
jean-pierre charras
42dfdf8c38
PCB_CONTROL::unfilledZoneCheck(): skip rule areas: they are not filled by definition.
...
Fixes #10691
https://gitlab.com/kicad/code/kicad/issues/10691
2022-01-31 17:04:05 +01:00
jean-pierre charras
26dfc4477f
PCB_TARGET: add missing TransformShapeWithClearanceToPolygon() method.
...
From Master branch.
2022-01-29 20:07:14 +01:00
Seth Hillbrand
38a4894d92
Prevent multiple single-point line solutions
...
Suggested by @rivimey, we test the case where both lines return singular
point lines and prevent them leaking into our drag solution
Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-29 07:07:03 -08:00
Seth Hillbrand
c2707f3cc0
Fix large memory leak in DRC
...
All elements get effective shapes, many of which get triangulated. This
memory needs to be freed when destroying the tree
2022-01-28 17:07:11 -08:00
Seth Hillbrand
8753051db6
Don't count zero-length as duplicate
...
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points. A null track always matched this case,
which removed the valid track. We solve this by avoiding null tracks in
the duplicate checker. They are removed separately in the null track
stage.
This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing
Fixes https://gitlab.com/kicad/code/kicad/issues/10624
2022-01-28 16:34:00 -08:00
Seth Hillbrand
8ae304dcca
Don't allow degenerate lines in dragger
...
If walkaround returns an invalid line, don't consider it for a track
Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-28 15:18:42 -08:00
Seth Hillbrand
796893de56
Fix negative arc angles in PCAD import
2022-01-28 10:18:17 -08:00
jean-pierre charras
3f6a4296d9
Pcbnew, export svg: Fix incorrect saving of layer set.
...
From Master branch
2022-01-27 13:07:40 +01:00
jean-pierre charras
60ae18893e
PCB_POINT_EDITOR: fix missing init of PAD pos0 after changing
...
(From Master branch)
2022-01-22 10:43:23 +01:00
Steffen Mauch
d6c4215a1f
pcbnew: EAGLE importer does map value to wrong layer if nothing is defined in original EAGLE footprint
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10311
(cherry picked from commit 55b782d66e
)
2022-01-21 13:16:41 -08:00