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
Jeff Young
c02cadec2a
Exclude rules which match no enabled layers.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10227
(cherry picked from commit 0967cc82e2
)
2022-01-21 15:06:18 +00:00
Jeff Young
b608ebd058
Don't findnext on an empty string; show the dialog.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10313
(cherry picked from commit 60fc75e239
)
2022-01-21 15:05:27 +00:00
Jeff Young
6d7659fb20
Flip arc endpoints when mirroring in FPEditor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10550
(cherry picked from commit 7f6bc28f87
)
2022-01-21 15:02:15 +00:00
Seth Hillbrand
dd7029ea07
Always use the project directory for default save
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10478
2022-01-20 11:51:16 -08:00
Wayne Stambaugh
da28ade004
Footprint editor: use most recently used path on footprint import.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10418
(cherry picked from commit c154e85ebd
)
2022-01-16 09:48:21 -05:00
Jon Evans
2306d00c89
Do not check key states for non-key events in TryBefore
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10127
2022-01-13 22:28:45 -05:00
Jon Evans
20bbf9b179
PNS: Do not clear layer pairs when importing new sizes
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10225
2022-01-13 20:37:37 -05:00
Jon Evans
cf4d46b24d
PNS: Do not allow smart pads when in 90-degree mode
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10386
2022-01-13 20:21:19 -05:00
qu1ck
739c14eaa2
FOOTPRINT::GetProperty() swig extension
...
(cherry picked from commit 33a4c9b08e
)
2022-01-13 13:10:44 -08:00
Wayne Stambaugh
adfbfc27af
Footprint editor: fix Eagle plugin footprint library layer mapping bug.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10354
(cherry picked from commit a77b5649cc
)
2022-01-12 20:52:55 -05:00
dana
57d58fe335
Handle Unicode clipboard data in pcbnew and symbol editor
...
Fixes #10323
(cherry picked from commit 8373180cbb
)
2022-01-12 09:23:24 -08:00
Roberto Fernandez Bautista
b2ecf097ed
Include Footprints within Groups when re annotating duplicates
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10329
(cherry picked from commit de7158b80e
)
2022-01-11 20:52:01 +00:00
Seth Hillbrand
8dca61ce9c
Fix copy-paste error
2022-01-11 06:08:15 -08:00
Seth Hillbrand
bd7841bf96
Handle arcs in global track width changes
...
Also add defensive code against invalid indices
Fixes https://gitlab.com/kicad/code/kicad/issues/10325
2022-01-10 17:19:49 -08:00
Seth Hillbrand
a74d1d9962
Keep ratsnest setting when pasting
...
Paste items should copy the global ratsnest visibility setting
Fixes https://gitlab.com/kicad/code/kicad/issues/10346
2022-01-10 12:48:03 -08:00
Seth Hillbrand
4d899d7820
Remove default hotkey for toggle zone display
...
It is too easy to accidentally hide your zones and the 'A' hotkey is
intuitively mapped to Add Footprint, to match Add Symbol in eeschema.
This won't change current hotkey customizations but will help prevent
future user error. Users can still map the action to a hotkey if the
new toggle is useful to their workflow
2022-01-10 11:48:26 -08:00
Seth Hillbrand
4907b90215
Fix FP circle validity check
...
Radius is encoded by m_endX
Fixes https://gitlab.com/kicad/code/kicad/issues/10337
2022-01-10 10:54:23 -08:00
Wayne Stambaugh
bbf00e0461
Pcbnew: honor footprint exclude from BOM setting.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10297
(cherry picked from commit f379c49084
)
2022-01-09 11:30:06 -05:00
Jon Evans
76f21d950d
Ensure LIB_TREE cleans up while frame still exists
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10266
2022-01-08 17:32:17 -05:00
Seth Hillbrand
bfca928900
Plot pads in layer color
...
v6 pads are not allowed to be a different color from the rest of the
copper layer, so don't query the GAL layer for a color
Fixes https://gitlab.com/kicad/code/kicad/issues/10293
2022-01-07 08:55:59 -08:00
qu1ck
4bcfa8df1f
Template for vector<VECTOR2I> in swig
2022-01-06 23:48:52 -05:00
Seth Hillbrand
78e737b9d8
DRC scripting: load project from board if possible
...
s_SettingsManager is not always initialized when the WriteDRCReport is
run. We should first attempt to extract the project from the actual
board being checked. Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.
Fixes https://gitlab.com/kicad/code/kicad/issues/10221
2022-01-06 11:50:21 -08:00
Steffen Mauch
362eedc510
pcbnew: EAGLE plugin is case sensitive to >VALUE / >NAME
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10253
(cherry picked from commit 82f147ecef
)
2022-01-05 08:07:41 -05:00
Steffen Mauch
11402e2db1
pcbnew: fixing eagle_plugin with empty class names
...
Fixes #10229
https://gitlab.com/kicad/code/kicad/issues/10229
(cherry picked from commit a5307c6f59
)
2022-01-05 07:22:01 -05:00
Jon Evans
f9d8ec6137
Handle footprint shapes in polygon creation
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259
2022-01-04 21:31:22 -05:00
Jon Evans
e9b91b6fab
Fix creating polygons from footprint rule areas
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257
2022-01-04 21:28:04 -05:00
Seth Hillbrand
873353d8d7
Prevent clipping by default
...
The text bbox inflation from fb4343bc
clips dimensions by default. This
restores the default size to not clip the dimension line. It is still a
bit larger than I'd like it to be but is usable
Fixes https://gitlab.com/kicad/code/kicad/issues/10033
2022-01-04 12:11:23 -08:00
Thomas Pointhuber
dec310f7f8
altium: Fix board outline import with arcs using SHAPE_LINE_CHAIN instead of a hack
2022-01-04 19:57:26 +01:00
Seth Hillbrand
ca8cf14dff
Fix missing FOOTPRINT cast in swig
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10236
2022-01-04 10:49:29 -08:00
Seth Hillbrand
ed9a3deb57
Fix pad snapping in renumber pads
...
Snap shouldn't be looking for other items in this routine or using the
grid
Fixes https://gitlab.com/kicad/code/kicad/issues/10238
2022-01-03 17:18:03 -08:00
Seth Hillbrand
1874ad2f7e
Catch errors from `load()`
...
Loading footprints may throw in some cases. We need to catch these
nicely without breaking out of the full loading process
Fixes https://gitlab.com/kicad/code/kicad/issues/10213
2022-01-03 15:30:20 -08:00
Jon Evans
45182febaf
Exit router and invoke edit tool when attempting to drag an arc track
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10208
2022-01-02 16:10:26 -05:00
Jon Evans
134b09004b
Fix highlighting color logic when net colors are active
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10157
2022-01-02 12:11:24 -05:00
Jon Evans
c52421869a
Fix saving of existing appearance presets
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10166
2022-01-02 11:59:19 -05:00
Seth Hillbrand
bd75cffff3
Prevent ops on empty selection
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10164
2022-01-01 15:28:47 -08:00
Marek Roszko
cbdfb5d396
Remove the unused updateui in the selection filter base
...
(cherry picked from commit e75d283007
)
2021-12-30 17:18:38 +00:00
Erwan Rouault
11c967b259
pcbnew: Add via height support in drc length
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10135
2021-12-30 14:34:44 +00:00
Jon Evans
0ec440805d
Tune connectivity progress reporter
...
We don't need quite as many updates, this helps speed a little
See https://gitlab.com/kicad/code/kicad/-/issues/10154
2021-12-30 09:16:19 -05:00
Marek Roszko
67fe8904c0
Add win32 VERSION_INFO resource blocks for the DLLs
...
(cherry picked from commit 3f711b8958
)
2021-12-29 04:56:26 +00:00
Jacob Mealey
cc84344499
fix in pcbnew/python/swig/units.i ... added error handling
...
Added error handling in unit conversions for the pcbnew python bindings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10081
2021-12-28 07:21:35 +00:00
Marek Roszko
b7ec594c0a
Use the correct parent for the root node placeholders of board setup
...
(cherry picked from commit 38842647b8
)
2021-12-28 01:16:05 +00:00
Marek Roszko
ceb4d08ce9
Fix race condition with ShowEventCounters on Windows
...
(cherry picked from commit 3dd8c57bdd
)
2021-12-26 13:33:18 +00:00
jean-pierre charras
b95032901e
pcbnew print: minor fix: option edge.cut on all layers not stored. Fixes #10046 https://gitlab.com/kicad/code/kicad/issues/10046
2021-12-23 18:36:42 +01:00
jean-pierre charras
753e08a944
Use ChangeValue() instead of SetValue() in some wxTextCtrl (It avoids generating unused events)
2021-12-23 18:36:42 +01:00
jean-pierre charras
da5f2366f9
PANEL_SETUP_BOARD_STACKUP: fix a typo that prevent displaying a color swatch. Fixes #10027 https://gitlab.com/kicad/code/kicad/issues/10027
2021-12-23 18:36:24 +01:00
Jeff Young
93c48b9d46
Hot-update units in track editing dialogs.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10099
(cherry picked from commit 4e8a7fc911
)
2021-12-23 17:01:44 +00:00
Jeff Young
1b033d56a7
Improve clean up tracks & vias algorithm for neck-downs.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10098
(cherry picked from commit d5a5928e5a
)
2021-12-23 17:01:39 +00:00
Jeff Young
ad583eab13
Add hot-updating of units in common wxGrids.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10020
(cherry picked from commit 6e2460ad37
)
2021-12-23 17:01:34 +00:00
Jeff Young
0d3246e3ab
Don't commit zone refill if there were no changes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10085
(cherry picked from commit 77239591c0
)
2021-12-23 17:01:31 +00:00
Jeff Young
76fd029cd6
Don't leave stranded symbols/footprints in editors when doc closes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10026
(cherry picked from commit 9af33cdfe8
)
2021-12-23 17:01:25 +00:00
Jeff Young
1dc78c4adc
Tidy up pad & parent footprint selection corner cases.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9923
(cherry picked from commit d9dba2edb2
)
2021-12-23 17:01:19 +00:00
Jeff Young
9cb36e5bc5
Restore units to a bunch of wxGrids.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10063
(cherry picked from commit 8b52e969d6
)
2021-12-23 17:01:10 +00:00
Jeff Young
b6ff44cccf
Fix failure to remove hover selection after rotate operation.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10058
(cherry picked from commit f696c4ddfc
)
2021-12-23 17:01:06 +00:00
Jeff Young
e9e742816d
Scale markers somewhat proportionally to zoom.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10048
(cherry picked from commit a1c8e36c99
)
2021-12-23 17:01:01 +00:00
Seth Hillbrand
bd0fbea044
Handle 360° arcs on import as circles
...
KiCad breaks a bit when dealing with 360° arcs, so convert them to
circles on import. The break happens when converting to polygons for
viewing, the arc is passed from start->mid->end format to
center->start->angle format. At 360°, the angle is normalized to 0
2021-12-18 18:44:20 +00:00
Jeff Young
a17a58203b
Preserve legacy dimension information.
2021-12-17 23:31:37 +00:00
Jeff Young
699ba78b74
Fix legacy (pre-sexpr) board importer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10025
2021-12-17 17:21:31 +00:00
Jon Evans
1610195a09
Coverity fix
2021-12-15 23:17:04 -05:00
Tomasz Wlostowski
57af990066
router: fix layer switch issue when starting a track on via without fixed segments
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9915
2021-12-16 00:55:17 +01:00
Jeff Young
20dcf43fdd
Fix typo.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10009
2021-12-15 23:39:24 +00:00
Mike Williams
956ac871c3
PCB Editor: changes to track width overrides starting track width
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00:00
Tomasz Wlostowski
97c2627de6
router: added missing case items (fixes regression in component dragging)
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10010
2021-12-15 23:18:55 +01:00
Seth Hillbrand
24fe5bc2a8
Fix DRC thread locking
2021-12-15 06:05:40 -08:00
Roberto Fernandez Bautista
dadaf26ff1
Board Setup: Ensure board editor layers page always gets updated
...
We need to update it even if we move to a different page, as when moving
back to the physical stackup page it will reset the layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9991
2021-12-15 10:39:44 +00:00
Seth Hillbrand
40d44c94cd
Fix single-threaded loads/connectivity
...
We cannot set thread counts to hardware_concurrency()-1 without
considering that single core machines will get a thread count of 0.
2021-12-14 17:18:46 -08:00
Tomasz Wlostowski
965ab42938
router: when dragging segments, don't snap to other segments on the same layer. Fixes drag flickering for short segments.
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9720
2021-12-15 01:48:04 +01:00
Tomasz Wlostowski
2ae3a83b54
router: fix use-after-free crash in single trace shove routing when m_endItem's owning NODE is erased by the springback algorithm.
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9994
2021-12-15 01:33:05 +01:00
Seth Hillbrand
401de24274
Recalculate ratsnest after zone fill
...
Push the mutex down into the ZONE::Fill() routine and set the
connectivity update to run after zone fills. The connectivity update
cannot run while the mutex is locked for zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/9993
2021-12-14 13:37:15 -08:00
Roberto Fernandez Bautista
aa64b739eb
Board stackup: Ensure that m_choiceCopperLayers is updated
...
Need to do a full synchronisation with the board to ensure that the
drop down and other UI elements are reset
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9991
2021-12-14 18:00:07 +00:00
Seth Hillbrand
78ff9a857a
Jerry-rig HTML-format alpha parsing
...
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors
Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
Wayne Stambaugh
348c2bc612
Fix another wxUpdateUIEvent retrigger loop.
2021-12-13 18:43:30 -05:00
Wayne Stambaugh
755607b8f8
Fix a few wxUpdateUIEvent retrigger loops.
2021-12-13 15:46:13 -05:00
Jeff Young
4c565fd222
Top layers includes a whole bunch of layers...
...
... and the first isn't particularly meaningful. Use GetActiveLayer
instead.
Fixes https://gitlab.com/kicad/code/kicad/issues/9972
2021-12-13 18:23:18 +00:00
Simon Schaak
8e5f929724
Fix default reference text copy for new footprints
2021-12-13 14:42:14 +00:00