Commit Graph

7628 Commits

Author SHA1 Message Date
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
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 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 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
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 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
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
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 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
Seth Hillbrand 84db5644d6 pcbnew: Adjust drag snapping to avoid start
When dragging, you will seldom want to snap to the original item.  This
commit prevents the "size of track" snap to the original item and
replaces it with an auxilary grid origin for the snap.  This means
effectively that the snap will happen to grid for the original item
unless the cursor is closer to the original item line than it is to the
grid crossing.

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

(cherry picked from commit 0de25e557b)
2019-08-15 12:43:19 -07:00
Seth Hillbrand fc1fb7a590 PNS: Don't allow routing on hidden layers
If the layer is not shown, we should not be allowing it's items to be
selected and chosen as the start/end items in the router.
2019-08-15 12:38:16 -07:00
Jeff Young 3475bfb2aa New move tool doesn't require GetAndPlace to jump through hoops.
And at least one of those hoops leaves the cursor forced.

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

(cherry picked from commit dd938b02df)
2019-08-13 10:02:57 +01:00
jean-pierre charras f9f8fade89 Pcbnew plot: fix missing footprint texts on solder mask layers.
Fix from master branch commit 1c295d46a9
2019-08-13 09:55:11 +02:00
Jeff Young e404fb772b Invoke move by ACTION; the EDIT_TOOL does lots of other stuff too.
Fixes: lp:1839877
* https://bugs.launchpad.net/kicad/+bug/1839877

(cherry picked from commit f3f0a6899f)
2019-08-12 23:00:55 +01:00
Jeff Young 3f91db25d4 Minimal cherry-pick of c836cc9cf8.
Fixes: lp:1839534
* https://bugs.launchpad.net/kicad/+bug/1839534
2019-08-10 22:27:05 +01:00
Jeff Young 72c0267fe6 Ativate delete tool so it can display the selection clarification menu when needed.
Fixes: lp:1835371
* https://bugs.launchpad.net/kicad/+bug/1835371

(cherry picked from commit c60118b6a4)
2019-08-03 22:49:27 -06:00
Seth Hillbrand c9956def36 pcbnew: Fix copy-paste error from 161dc9ce7
create_vrml_shell() needed the idxSide check but create_vrml_plane only
had an extra variable that wasn't used and so shouldn't be checked.
2019-08-02 13:14:02 -07:00
Jeff Young d482a8805c Perform better cleanup after cancelling text placement.
Fixes: lp:1838452
* https://bugs.launchpad.net/kicad/+bug/1838452
2019-07-31 23:17:08 -06:00
Seth Hillbrand 161dc9ce7e pcbnew: Fix VRML export checking
In rare cases, the VRML triangulator may claim to work but return empty
vectors.  These cases need to be caught before we dereference the vector
elements.

Fixes: lp:1838448
* https://bugs.launchpad.net/kicad/+bug/1838448
2019-07-31 20:03:49 -07:00
jean-pierre charras 090073cc3b Pcbnew, exchange footprints: fix a bug that prevent the new footprint to be at the right place.
Fixes: lp:1838446
https://bugs.launchpad.net/kicad/+bug/1838446
2019-07-31 12:07:49 +02:00
Ian McInerney 6ae718e4d6 pcbnew: Fix DXF units in drill map plotting
Fixes: lp:1836924
* https://bugs.launchpad.net/kicad/+bug/1836924

(cherry picked from commit 6c401ecce7)
2019-07-30 17:20:38 -04:00
Thomas Pointhuber 783b1cb611 Fix handling of filled circle in eagle importer (was only partly fixed)
Partly fixed in 4fc692f04b, but missed
that there is a loadPlain where I need to handle this case as well.

(cherry picked from commit 5f438b7a85)
2019-07-30 15:33:39 -04:00
Jeff Young 4b01f80e8d Fix typo in cherry-pick.
Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-30 11:49:06 -06:00
Jeff Young c8278f377b Alternative to cherry-picking b70df18939.
Fixes: lp:1838158
* https://bugs.launchpad.net/kicad/+bug/1838158
2019-07-29 20:19:46 -06:00
jean-pierre charras c8f40e1d26 PANEL_SETUP_NETCLASSES_BASE: fix minor wxAlert. 2019-07-28 13:26:58 +02:00
jean-pierre charras 185a8d7582 Try to fix UI issues in select layer pair dialog and slect layer dialog.
Fixes: lp:1838173
https://bugs.launchpad.net/kicad/+bug/1838173
2019-07-28 12:55:47 +02:00
Jeff Young 6aeedfb70c Partial cherry-pick of 3904d7ccfc.
Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 20:46:12 -06:00
jean-pierre charras 7df05ade4c Pcbnew: Fix bug in MODULE::FindPadByName( const wxString& aPadName ). This method was using a case insensitive comparison to find the pad matching aPadName. But in netlist we are using case sensitive comparisons to attribute a net to a pad. So if in the netlist there is a pad name that does not match any footprint pad name using case sensitive comparison but if it matches some pads using case insensitive comparison, the net is not set, but the test to detect non existing pads fails. 2019-07-25 17:57:38 +02:00
Jeff Young ca0d4511a9 Copy ratsnest flags when exchanging modules.
Fixes: lp:1834214
* https://bugs.launchpad.net/kicad/+bug/1834214

(cherry picked from commit 2ca379b281)
2019-07-21 20:27:12 -06:00
Jeff Young b56855c542 Don't shove stitching vias.
Whether or not it's a good idea, the current algorithm doesn't support
it and leaves them on top of each other.

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

(cherry picked from commit aa4d7682ca)
2019-07-21 16:41:56 -06:00
Jeff Young 72e8eb3b94 Initialize plot with aux origin checkbox.
Fixes: lp:1836923
* https://bugs.launchpad.net/kicad/+bug/1836923

(cherry picked from commit b5e01ea163)
2019-07-20 07:58:43 -06:00
Jeff Young 281a1cdc2c Update DXF units drop-down.
Fixes: lp:1836927
* https://bugs.launchpad.net/kicad/+bug/1836927

(cherry picked from commit 4a1edf581e)
2019-07-20 07:58:38 -06:00
Seth Hillbrand e0589d2908 pcbnew: Make clearance translucent
This sets the clearance outline to a slightly better opacity to allow
viewing of items behind the routed track clearance.  Future work should
include making this a configuration option.

Fixes: lp:1826719
* https://bugs.launchpad.net/kicad/+bug/1826719
2019-07-18 10:44:44 -07:00
Jeff Young dfd53976d4 Fix double-highlighted radio buttons on GTK.
Fixes: lp:1836538
* https://bugs.launchpad.net/kicad/+bug/1836538
2019-07-17 12:57:21 +01:00
Ian McInerney 02d43be93c pcbnew: Make the netlist class panel usable with a lot of classes
Fixes: lp:1826154
* https://bugs.launchpad.net/kicad/+bug/1826154

(cherry picked from commit 39954b20fe)
2019-07-15 06:12:13 -07:00
jean-pierre charras 2e8bceb676 Fix a minor wxWidgets alert, already fixed in master branch. 2019-07-15 12:27:54 +02:00
Jeff Young 16f9e697ab Allow edits to self-intersecting polygons.
1) Intermediate states might be self-intersecting, and we shouldn't
be policing our users on what order to do things in
2) The polygon might already be self-intersecting, at which point we're
preventing the user from fixing it.

Also includes better const management for SHAPE_POLY_SET API.

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

(cherry picked from commit a3c74051c2)
2019-07-14 18:36:47 +01:00