Commit Graph

15566 Commits

Author SHA1 Message Date
Jeff Young 2278f40051 Fix zero failure in SEG::PointCloserThan().
Fixes: lp:1843329
* https://bugs.launchpad.net/kicad/+bug/1843329
2019-09-09 23:22:29 +01:00
Ian McInerney 18a76d3a87 Manually put the UNIT_BINDER text on the primary selection clipboard
The OnKillFocus handler of the UNIT_BINDER replaces the text in the
control with the evaluated string, which removes the selection. To
get the original text on the primary selection clipboard, we must
add it ourselves.

Fixes: lp:1794623
* https://bugs.launchpad.net/kicad/+bug/1794623
2019-09-09 09:02:23 -07:00
Jeff Young 6a65461ec7 Replace buggy code in TestSegmentHit() with call to SEG::PointCloserThan()
Fixes: lp:1843101
* https://bugs.launchpad.net/kicad/+bug/1843101

(cherry picked from commit 6f0d8c3eac)
2019-09-08 12:40:33 +01:00
Jeff Young a5a0a7c4f3 Fix bug with high-frequency plots.
Fixes: lp:1839712
* https://bugs.launchpad.net/kicad/+bug/1839712

(cherry picked from commit 2ac270ce8e)
2019-09-08 01:12:33 +01:00
Jeff Young f1e6f8042c Check for dup layer names in the GUI, not in the internals.
Doing so in the internals keeps users from being able to swap layer
names as the dialog does each layer name change individually.

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

(cherry picked from commit f491b7fff7)
2019-09-07 23:57:49 +01:00
Jeff Young 848873d87e Add some protection against newlines sneaking into the file.
Fixes: lp:1842943
* https://bugs.launchpad.net/kicad/+bug/1842943
2019-09-07 02:32:56 +01:00
Jeff Young 75bb864237 Workaround wxWidgets inability to find the default PDF viewer.
Fixes: lp:1843061
* https://bugs.launchpad.net/kicad/+bug/1843061

(cherry picked from commit d55f4d05b4)
2019-09-07 00:07:06 +01:00
Ian McInerney d5275b16aa eeschema: Find the closest line end to the mouse when grabbing
Fixes: lp:1842175
* https://bugs.launchpad.net/kicad/+bug/1842175
2019-09-06 14:16:56 -07:00
Seth Hillbrand 15d1b6cef0 eeschema: Handle broken spin style value
The spin style is stored as a numeric and can be corrupted.  We handle
this by triggering assertions for debugging the bad value while
resetting to default if we have non-valid spin values that are outside
the array.

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

(cherry picked from commit c3226653cc)
2019-09-06 13:18:34 -07:00
Wayne Stambaugh 6d4dd3e17a Pcbnew: fix size of graphics import warning dialog.
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.

Fixes lp:1839565

https://bugs.launchpad.net/kicad/+bug/1839565

(cherry picked from commit 24454f5105)
2019-09-06 14:59:40 -04:00
Ian McInerney 649c22a34e wxWidgets compatibility fixes
* Remove unneeded check
* Fix WX_GRID since upstream renamed a variable in 3.1.3

(cherry picked from commit 8d86d94a4d)
2019-09-06 08:48:03 -04:00
Jeff Young 8d04d39036 Cherry-pick of https://git.launchpad.net/kicad/patch/?id=c03535343c67c17ddf0ac18621743d9cf762eb05
Fixes: lp:1842652
* https://bugs.launchpad.net/kicad/+bug/1842652
2019-09-04 20:08:39 +01:00
Jeff Young 0e90c719b0 Update description in footprint tree when it's edited.
Fixes: lp:1842660
* https://bugs.launchpad.net/kicad/+bug/1842660

(cherry picked from commit 6688e80131)
2019-09-04 17:24:17 +01:00
jean-pierre charras a79526cad8 Footprint viewers: force cairo canvas instead of legacy canvas when the legacy canvas is selected in the board editor.
Legacy canvas does not work in footprint preview panel and does not work fine in footprint viewer frame.

Fixes: lp:1842483
https://bugs.launchpad.net/kicad/+bug/1842483
2019-09-04 16:00:54 +02:00
jean-pierre charras d05d8b6100 Pcbnew: Fix incorrect canvas type saved in config, when the type is legacy canvas. 2019-09-04 11:22:55 +02:00
Jeff Young 9856867954 Correct tooltip for Footprint Filter icon on Cvpcb toolbar.
Fixes: lp:1842477
* https://bugs.launchpad.net/kicad/+bug/1842477
2019-09-03 19:46:39 +01:00
Ian McInerney 19064b680e Make the extension check for graphics import case insensitive
The regex for the file extension that matches against all case
possibilities is only built on Linux.

Fixes: lp:1842180
* https://bugs.launchpad.net/kicad/+bug/1842180
2019-09-02 10:03:39 +02:00
jean-pierre charras 95265c765b Pcbnew, DIALOG_TEXT_PROPERTIES: make lines thickness editable when editing a dimension.
From Master branch (commit 762dabd7)

Fixes: lp:1841797
https://bugs.launchpad.net/kicad/+bug/1841797
2019-09-02 10:03:39 +02:00
Jeff Young 1ed8912f57 Workaround an issue where a throw terminates (even when there's a catch for it).
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.

(cherry picked from commit e269b5d1b9)
2019-09-01 12:37:58 +01:00
Jeff Young 82a0eb4413 Use Move() instead of SetPosition() so that the second pt gets updated too.
Fixes: lp:1841989
* https://bugs.launchpad.net/kicad/+bug/1841989

(cherry picked from commit 315a99e0fe)
2019-08-30 23:32:54 +01:00
Jeff Young be7215402b Partial cherry-pick of 79d062aefc. 2019-08-30 13:47:39 +01:00
Seth Hillbrand 4500b064d8 Handle active layer overloading
Setting the active layer should be tied to the events that are triggered
by the layer change and overloaded for each frame.  This ties the hotkey
back to these events.

Note: In the 5.1 cherry-pick this also adds the missing hotkey to
footprint editor

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

(cherry picked from commit 494d0de9b8)
2019-08-28 05:57:48 -07:00
jean-pierre charras 93d191d7c9 fix compil error 2019-08-28 10:05:25 +02:00
jean-pierre charras 1607ceaf3e Eeschema, symbol tree selector: make the selected lib and symbol readable.
Previously, the background was highlighted, but not the text.
On Windows, the text was unreadable, until it was selected.

From Master, commit 34e00bdb.
2019-08-28 09:34:46 +02:00
Jeff Young 5b24ea9dd9 Clearance should be in mils, not inches.
Fixes: lp:1841360
* https://bugs.launchpad.net/kicad/+bug/1841360

(cherry picked from commit 7c85dc6cd7)
2019-08-27 21:15:54 +01:00
Jeff Young c879dcaf7d Sort pins by number when grouping by name.
Fixes: lp:1828648
* https://bugs.launchpad.net/kicad/+bug/1828648

(cherry picked from commit 97212acecb)
2019-08-27 21:15:17 +01:00
Jeff Young 86691dabbf Partial cherry-pick of 03da721030.
Fixes: lp:1841361
* https://bugs.launchpad.net/kicad/+bug/1841361
2019-08-27 18:16:25 +01:00
Seth Hillbrand fe71a66bb9 pcbnew: Force resize event when changing pad type
The local settings panel needs to have its children sized when shown.
Triggering a resize event on changing the pad shape accomplishes this.
This is not triggered in master due to refactor of the custom pad
connection options.

Fixes: lp:1837789
* https://bugs.launchpad.net/kicad/+bug/1837789
2019-08-27 05:55:04 -07:00
Seth Hillbrand 80e0d848f2 eeschema: Modify all units at the same time
When editing symbol library reference, this ensures that all units are
modified by the same action and the component is not represented by its
subunits.

Fixes: lp:1834509
* https://bugs.launchpad.net/kicad/+bug/1834509
2019-08-26 20:42:29 -07:00
Seth Hillbrand 8b3a2984bf pcbnew: Two layer boards need both masks
Adds the missing default layer to the default board setups for two
layers with parts on single side (either top or bottom)

Fixes: lp:1841294
* https://bugs.launchpad.net/kicad/+bug/1841294
2019-08-26 17:14:13 -07:00
Seth Hillbrand fccce265aa pcbnew: Retain 45° constraint
This also finishes the polygon with 45° lines when chosen as a create
option.

Fixes: lp:1833673
* https://bugs.launchpad.net/kicad/+bug/1833673
2019-08-26 14:33:30 -07:00
Seth Hillbrand a43a228f78 eagle: Set module-relative position of ref/val
We need to set the footprint local coordinates of the footprint
reference and value fields at instantiation separately from the
TEXT_DIVERS elements.

Fixes: lp:1829727
* https://bugs.launchpad.net/kicad/+bug/1829727
2019-08-26 09:56:42 -07:00
Jeff Young dd8610fd5c Don't apply GTK fix to OSX as it causes a hang.
Fixes: lp:1841379
* https://bugs.launchpad.net/kicad/+bug/1841379

(cherry picked from commit de8f97be6b)
2019-08-26 00:50:54 +01:00
Seth Hillbrand b991beb712 pcbnew: Fix error in connecitivty calculation
Point in polygon should test against half the stroke width as the stroke
is performed _on_ the polygon edge.

(cherry picked from commit 820c2d2722)
2019-08-23 10:52:11 -07:00
Seth Hillbrand 25f6483488 gerbview: Ensure selection lives on top
Just picking the next layer will be overwritten when we have multiple
objects on the same layer in gerbview.  Move the selection to the top to
ensure it is out top-most layer when drawing.

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

(cherry picked from commit 77488e379c)
2019-08-22 10:52:56 -07:00
Seth Hillbrand efc0325e14 Handle wx scrollbar thumbs in system-independent way
The thumb size changes between system versions and (on GTK) render
managers, so hard-coded wasn't working.  This gets the actual value from
the system and uses to adjust the range.  Changes in the range can also
trigger the refresh.

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

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

(cherry picked from commit 85df994eda)
2019-08-22 10:16:25 -07:00
Seth Hillbrand d19ec021fe PNS: Check that we are optimizing a pad
Vias are also sent to breakout optimizer, so we need to check for the
solid cast before dereference.

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

(cherry picked from commit 03d5bf0df5)
2019-08-22 09:03:12 -07:00
Seth Hillbrand b34a307936 pcbnew: Scale line width for import
The line width in the import dialog is meant to reflect the resulting
width and not the given width of the file.

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

(cherry picked from commit 22fdc7f51f)
2019-08-21 10:35:40 -07:00
Seth Hillbrand fb565caf7b pcbnew: Optimize pad connection revision
This modifies that logic for optimizing pad connections.

1) Custom pads now prefer the connections to their longer side.  This is
particularly important to match the behavior in a rectangular pad
2) Costs for straight lines are non-zero.  This favors fewer connections
3) Custom pad breakouts are at the polygon boundary rather than offset
by 0.1mm.  This also matches the circular and rectangular paradigm.
4) Line Heads contained in the pad itself are not optimized.  This
prevents escaping the pad unnecessarily

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

(cherry picked from commit 06cb21cc47)
2019-08-20 19:37:59 -07:00
Seth Hillbrand 6796e8fff6 EEschema: Plot stroked edges over BG
Items that have BG fill need to be plotted in the background but we
still need their stroked edges to be in the FG.  This is a workaround
that overplots the edges ensuring visual similarity.  Re-working the
plot engine to support layers is a larger project.

Fixes: lp:1833428
* https://bugs.launchpad.net/kicad/+bug/1833428
2019-08-20 12:03:19 -07:00
Seth Hillbrand 213547f545 SVG: Correct plot fills for arcs/polylines
When plotting in Eeschema, various elements may be filled with either
the foreground or background colors.  The fill mode is rather unique,
requiring un-stroked pie wedges for arcs and both closed and open filled
polylines.

Fixes: lp:1840769
* https://bugs.launchpad.net/kicad/+bug/1840769
2019-08-20 12:01:00 -07:00
Jeff Young 73851e962b Implement undo/redo for lock/unlock/toggle lock.
Fixes: lp:1840770
* https://bugs.launchpad.net/kicad/+bug/1840770

(cherry picked from commit b219fbc3d2)
2019-08-20 16:42:20 +01:00
Jeff Young de22204514 Allow mouse drag to initiate a router drag if over a track or via.
Fixes: lp:1840694
* https://bugs.launchpad.net/kicad/+bug/1840694

(cherry picked from commit 1bfefc61ea)
2019-08-19 23:32:56 +01:00
Seth Hillbrand ebba15fe67 Alphabetize Library Table returns
KiCad is case sensitive but we need to be consistent in displaying sort
order as case insensitive (same as file systems)

Fixes: lp:1836911
* https://bugs.launchpad.net/kicad/+bug/1836911
2019-08-19 15:23:29 -07:00
Jeff Young c1cd3339fa Fix assertion in new Duplicate Hotkey warning message. 2019-08-19 14:24:26 +01:00
Jeff Young 713a296a59 Update all aliases of current node after Symbol Properties dialog.
Fixes: lp:1840466
* https://bugs.launchpad.net/kicad/+bug/1840466
2019-08-19 10:55:17 +01:00
jean-pierre charras 06bde527d5 Pcbnew, layer manager: fix flicker when loading a file, and incorrect size on start when no file is loaded
From master, commit b25ffc0
2019-08-19 10:58:45 +02:00
Erik Bosman dcd31f5701 Fix a null-pointer dereference in 5.1 branch
TRACK::GetEndNetCode() can get called using a NULL-pointer as 'this'.
The compiler assumes this won't happen and optimizes away a NULL pointer
check at the start of the function (so we might as well remove this check.)

Fixes: lp:1840562
https://bugs.launchpad.net/kicad/+bug/1840562
2019-08-18 14:59:58 +02:00
Seth Hillbrand 65f2af5849 3d: Disable floor rendering by default
The floor render in raytracing creates interesting shadow effects but
significantly increasing the processing time for renders and has the
side effect of making the bottom of the board very dark if you simply
flip it over.  Making this option off by default, we allow power users
to turn it on if needed for their renders while speeding up the default
raytrace and preventing new user confusion.

(cherry picked from commit 4fcfd266e0)
2019-08-16 11:42:21 -07:00
Seth Hillbrand 2dd7a8637c pcbnew: Handle edge cuts in footprints for bbox
The Board bounding box calculation has two modes: edges only and
everything.  While the everything mode works as expected, the edges only
calculation (and everything that depends on it) was seeing only the edge
cuts on the board drawings layer and not the footprint edge cuts.

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

(cherry picked from commit 99859727e8)
2019-08-16 11:14:14 -07:00