Commit Graph

7544 Commits

Author SHA1 Message Date
Wayne Stambaugh 8002692f3e CvPcb: fix save changes dialog layout issue.
DIALOG_EXIT was not being laid out correctly after setting the dialog
message.  Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT.  This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.

Remove DIALOG_EXIT_BASE as it is no longer required.

Fixes lp:1832899

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

(cherry picked from commit 3f665318f4ab5c02b7d3c29b5233a273fdac2e4e)
2019-06-16 12:28:35 -04:00
Ian McInerney 44f1059000 Allow DXF to be exported in either inches or millimeters
Fixes: lp:1832188
* https://bugs.launchpad.net/kicad/+bug/1832188

(cherry picked from commit d5f680ecd2)
2019-06-13 16:10:12 -07:00
Ian McInerney cf4b41f7d9 pcbnew: Update plot dialog to contain a unit selector for DXF
(cherry picked from commit b2c848579a)
2019-06-13 16:10:03 -07:00
Ian McInerney 71f5f96e64 Remove help from F1 key and move it to an action
Create a new action in pcbnew, gerbview and the footprint viewer/
editor to display the help documentation. Disconnect the wxID_HELP
event from the window so that it no longer conflicts with the zoom
action.

Fixes: lp:1822041
* https://bugs.launchpad.net/kicad/+bug/1822041
2019-06-13 14:11:24 -04:00
Steven A. Falco cfa187f477 Show the current grid setting. 2019-06-13 12:14:41 -04:00
Seppe Stas 9233ae97d0 Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring

(cherry picked from commit 455ee4c08c)
2019-06-12 14:12:01 -07:00
Seth Hillbrand 3b3165ad51 pcbnew: Allow DRC violations when marked
We shouldn't consider any obstacles when we are routing in DRC violation
mode.

Fixes: lp:1826723
* https://bugs.launchpad.net/kicad/+bug/1826723
2019-06-09 13:00:13 -07:00
Seth Hillbrand 5ce0e7265b modedit: Clear undo when importing
Importing a footprint is creating a new board.  Undo breaks here as we
don't maintain undo/redo across boards.

Fixes: lp:1832107
* https://bugs.launchpad.net/kicad/+bug/1832107
2019-06-08 13:05:02 -07:00
Seth Hillbrand 35e87128f5 pcbnew: Ensure cursor remains set during tool activity
Mouse capture end is called by some actions such as save board.  This
resets the cursor image but doesn't change the current tool.  Resetting
the cursor image during action prevents this.
2019-06-08 10:23:38 -07:00
Seth Hillbrand dd93f89931 Import Vector Dialog formatting
This standardizes the import vector graphics file dialog to use the
sbSizer titles instead of bold+lines.  Tooltip changes will be in the
next change as we don't change strings for bugfix releases and this
commit is targeted for 5.1.3

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

(cherry picked from commit f7550940ee)
2019-06-08 09:47:29 -07:00
Seth Hillbrand 966173c129 pcbnew: Don't reset triangular points for intersection
We prevent the creation of invalid polygons by keeping the converging
lines from intersecting.  This test doesn't make sense for triangular
polygons as they always intersect and we want to allow them to move
outside of the singular point.

Fixes: lp:1831481
* https://bugs.launchpad.net/kicad/+bug/1831481
2019-06-07 21:35:03 -07:00
jean-pierre charras 55757039fa Custom pads: fix a bug when plotting the custom shape. This bug was seen only with some shapes, not all, and only for layers having a negative margin.
Fixes: lp:1831941
https://bugs.launchpad.net/kicad/+bug/
2019-06-07 10:51:43 +02:00
Seth Hillbrand 63f18f0b03 CMake: Handle custom_target indirection
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.

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

(cherry picked from commit c6af38477d)
2019-06-05 13:10:00 -07:00
Ian McInerney 006d7ddd31 pcbnew: Add context menu for measure tool
Fixes: lp:1831063
* https://bugs.launchpad.net/kicad/+bug/1831063
2019-06-02 07:57:41 -07:00
Seth Hillbrand 1e58b09d96 Don't change the board without user action
Grid and ratsnest visibility are stored in the board file and should not
be changed without the user explicitly modifying them.

In the future, we'll move these settings out of the board file but we
shouldn't cause extra file-churn for flipped bits.

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

(cherry picked from commit e7e20b85b5)
2019-05-29 11:28:28 -07:00
Jon Evans 1058ba6a0f PcbNew: ensure Bezier points are updated before plotting
(cherry picked from commit b060880aacfb5e2ff44dea0000733e835d0b8b2a)
2019-05-29 00:07:22 -04:00
Jon Evans f8c541c0d7 PcbNew: fix Bezier curves not having bounding boxes at startup
(cherry picked from commit 40621de3559ee3993d7193a0faee5d0a777be848)
2019-05-29 00:06:55 -04:00
Michael Kavanagh 18f7d0129a Stop PNS router settings from being overwritten when switching modes
Fixes: lp:1824967
* https://bugs.launchpad.net/kicad/+bug/1824967

(cherry picked from commit 27d097a78c)
2019-05-27 16:16:55 -07:00
Jon Evans eb4aded5d6 PcbNew: Fix ordering of fab and courtyard layers
Fixes: lp:1829511
* https://bugs.launchpad.net/kicad/+bug/1829511
2019-05-27 11:54:43 -04:00
Jon Evans 5230f45658 Prevent unbalanced PTH pad labels from being hidden by drills
Fixes: lp:1829067
* https://bugs.launchpad.net/kicad/+bug/1829067
2019-05-27 11:54:43 -04:00
Jon Evans cb3edf2607 PcbNew: Fix layer alpha overrides being overwritten by color changes
Fixes: lp:1827518
* https://bugs.launchpad.net/kicad/+bug/1827518
2019-05-26 20:20:31 -04:00
Jon Evans f101934909 Report actual intersection position for crossing tracks
Fixes: lp:1825588
* https://bugs.launchpad.net/kicad/+bug/1825588
2019-05-25 15:02:06 -04:00
Jon Evans ede2575018 Exclude invisible items from view bounding box for zoom-to-fit
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457
2019-05-25 10:44:15 -04:00
Jon Evans fb80ee5a0e Store items changed by connectivity algorithm in undo list
Fixes: lp:1828442
* https://bugs.launchpad.net/kicad/+bug/1828442
2019-05-24 21:55:49 -04:00
Michael Kavanagh 44fc69398c Fix footprint marked as modified when layer visibility changed
Fixes: lp:1830330
* https://bugs.launchpad.net/kicad/+bug/1830330

(cherry picked from commit 741140e4a4)
2019-05-24 16:17:43 -04:00
Wayne Stambaugh c162337cab Pcbnew: Python scripting support clean up.
Always check the return value of PyRun_SimpleString() for errors when a
Python script is run and show an error message rather than fail silently.

Enable Python interpreter I/O redirection in debug builds so that script
string errors will be shown when PyRun_SimpleString() is called.

Do not call PyErr_Print() after a PyRun_SimpleString() call failure.  It
doesn't do anything useful.

Do not call Py_Finalize() after a PyRun_SimpleString() call failure.  It
seems to cause Pcbnew to crash.

(cherry picked from commit 816f6db310)
2019-05-24 08:01:57 -04:00
Ian McInerney bf85eb9b4e pcbnew: Fixed listing of 3D libraries in the github wizard
Fixes: lp:1830137
* https://bugs.launchpad.net/kicad/+bug/1830137

(cherry picked from commit 0daf14f9c3)
2019-05-23 09:51:10 -07:00
Michael Kavanagh 2a932a2176 Allow setting cursor and aux items colour in footprint editor
Fixes: lp:1829850
* https://bugs.launchpad.net/kicad/+bug/1829850
2019-05-22 15:11:20 -04:00
Seth Hillbrand b2bcde1bfc EAGLE: Correct pcb text orientation
Fixes: lp:1829711
* https://bugs.launchpad.net/kicad/+bug/1829711

(cherry picked from commit 1181b9f9b4)
2019-05-22 10:38:16 -07:00
Seth Hillbrand ec6fd23636 EAGLE: Prevent numeric-only component references
KiCad does not allow references to be numeric only.  This prefixes such
references with "UNK" to note that the reference designator type is
unknown.

(cherry picked from commit a62a89eac3)
2019-05-22 10:38:16 -07:00
Seth Hillbrand 6f34f95c52 Allow squared inflation and inflate Eagle Zones
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.

This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline.  KiCad zones are drawn inside the polygon.  We need to both
increase the zone size and decrease the minimum pen width to account for
this.

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

(cherry picked from commit 490c805319)
2019-05-22 10:38:16 -07:00
Seth Hillbrand 94e5b36279 pcbnew: Allow adding SHAPE_LINE_CHAIN to zones
(cherry picked from commit bf0a466642)
2019-05-22 10:38:16 -07:00
Seth Hillbrand f0ce4d6336 eagle: Use width on imported lines if available
If not, use the current board design settings for line thickness based
on the board layer.

(cherry picked from commit c80e3e0ffc)
2019-05-22 10:33:24 -07:00
jean-pierre charras b62f94f5c2 Pcbnew: release the lock file if a board was loaded, and when clearing the board currently edited. When the board is cleared, the previous loaded board is no longer in edit. 2019-05-20 18:38:03 +02:00
jean-pierre charras daf09ed9fe Pcbnew: fix a (minor) lock file issue: the lock was too early set. If the file was (for some reason) not actually loaded, it was locked. Now, the file is locked only if it is actually loaded. 2019-05-20 18:37:49 +02:00
Seth Hillbrand 72794f1416 eagle: Use the "first" tag instead of pin num
Eagle parsing allows pin 1 to be different from the other pins in the
package but this is set by a tag marking the pin as "first" rather than
the actual number of the pin.

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

(cherry picked from commit dbc40096db)
2019-05-20 06:03:07 -07:00
Seth Hillbrand 65b38e8dcf pcbnew: Check for valid data before deleting
We need to check for valid rows and iterators before removing a 3d model

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

(cherry picked from commit f32c95229e)
2019-05-17 09:36:18 -07:00
Wayne Stambaugh 9b8780a2fd Pcbnew: fix bug in Eagle footprint plugin.
Some how a board object was required to fetch the line width when a
footprint is being parsed.  The problem is that there is no board
defined when loading Eagle footprint libraries so there was a nullptr
segfault as a result.  When there is no board defined, use the default
KiCad layer line widths.

Fixes lp:1829243

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

(cherry picked from commit 97166a72f5)
2019-05-17 08:40:05 -04:00
Wayne Stambaugh d1a065119e Pcbnew: fix crash when deleting DRC errors from DRC dialog.
Fixes lp:1828726

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

(cherry picked from commit a32bb4e9a5)
2019-05-14 18:42:03 -04:00
Wayne Stambaugh ae139403e4 Fix library table editor dialog environment variable grid column names.
Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1828459
(cherry picked from commit 6f27ef7f66)
2019-05-14 07:59:22 -04:00
Wayne Stambaugh d3c9154f9a Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
(cherry picked from commit 3c4f8c1bf7)
2019-05-13 16:22:52 -04:00
jean-pierre charras caba60968a Python fp wizards: fix a few issues in qrcode_footprint_wizard.py
Fixes: lp:1828744
https://bugs.launchpad.net/kicad/+bug/1828744
2019-05-13 13:26:08 +02:00
Martin McNamara 8c3d16a395 PCBnew: Fixes crosshair issue with "Place Text" and "Add Dimension".
When using "Place Text" the crosshair was freezing if cancelled before
placing text.

After the crosshair freezes, the next uses of the "Place Text" or
"Add Dimension" caused the crosshair to jump to the screen location
where the previously the crosshair was frozen.

Cancelling the "Add Dimension" caused the crosshair to jump to the
screen location where the crosshair was when cancelled on the next use
of the "Place Text" or "Add Dimension".

Fixes: lp:1822578
* https://bugs.launchpad.net/kicad/+bug/1822578
2019-05-11 06:54:40 -07:00
Michael Kavanagh bd997a3900 Add Save As hotkey to footprint editor
Fixes: lp:1828481
* https://bugs.launchpad.net/kicad/+bug/1828481

(cherry picked from commit a3483f44d2)
2019-05-10 15:39:33 +01:00
John Beard a6674ecd56 Pcbnew: remove SVG from menu text
The SVG importer is an advanced config. It's not supported or
normally available in 5.1, so don't advertise in the menu.

If the advanced config is enabled, the dialog will be able
to import SVG.

This could have been "Import *Vector* Graphics" like in master,
5.1 documentation will probably still say "DXF", so keep consistent.

Fixes: lp:1821571
* https://bugs.launchpad.net/kicad/+bug/1821571
2019-05-10 12:41:29 +01:00
jean-pierre charras 654651856f Custom pads: minor fix in legacy mode related to commit a155289f. 2019-05-09 16:46:13 +02:00
jean-pierre charras c489659a20 Custom pads: fix incorrect shape of masks when the shape is a polygon with holes and the mask margin is < 0. This is mainly the solder paste layer that shows this issue. This is due to the fact SHAPE_POLY_SET::Inflate does not work fine with polygons with linked holes. SHAPE_POLY_SET::InflateWithLinkedHoles it added to fix this issue.
Fixes: lp:1828287
https://bugs.launchpad.net/kicad/+bug/1828287
2019-05-09 16:24:39 +02:00
Tomasz Włostowski d94b8b9c0e router: copy m_maxClearance when cloning/branching PNS::NODEs
Fixes: lp:1813328
* https://bugs.launchpad.net/kicad/+bug/1813328

(cherry picked from commit 9e00f48efc)
2019-05-01 11:39:15 +01:00
John Beard 89d39cf8ff Pcbnew: use same null check as eeschema for recently used
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.

Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.

The same logic in the symbol tree is already handled in the
same way.

(cherry picked from commit 42d20cbd96)
2019-04-29 17:00:42 +01:00
jean-pierre charras 0ba130dbd3 Pcbnew: fix in board editor crash when try to load a footprint from Add footprint tool if the latest loaded footprint was deleted. In this case, the history has a cleared link that created the crash when the dialog tried to select this deleted FootprintEnumerate
Fixes: lp:1826794
https://bugs.launchpad.net/kicad/+bug/1826794
2019-04-29 17:23:27 +02:00