Commit Graph

15558 Commits

Author SHA1 Message Date
jean-pierre charras f0ac61a8fd Eeschema: minor fix for root sheet plot file name.
Fixes: lp:1833487
https://bugs.launchpad.net/kicad/+bug/1833487
2019-06-20 13:41:04 +02:00
Seth Hillbrand 8f7278e34f Eeschema: Normalize layer ordering between plot and screen
Fixes: lp:1833428
* https://bugs.launchpad.net/kicad/+bug/1833428
2019-06-19 10:49:28 -07:00
Seth Hillbrand b124599de3 Don't skip handled events in GTK
Now that our tool framework handles the hotkeys, we need to skip the
passed handling work-around for actions that are already handled in the
event.

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

(cherry picked from commit b876309999)

Fixes: lp:1819210
* https://bugs.launchpad.net/kicad/+bug/1819210
2019-06-18 22:06:10 -07:00
Seth Hillbrand 697234dd51 eeschema: Insert junctions when repeating
Fixes: lp:1832253
* https://bugs.launchpad.net/kicad/+bug/1832253
2019-06-18 19:38:13 -07:00
Seth Hillbrand ba97494d6f Update toolbar to get new icon/tooltip
After a save-as the footprint belongs to the library, we need to refresh
the toolbar to get the correct icon.

Fixes: lp:1826889
* https://bugs.launchpad.net/kicad/+bug/1826889
2019-06-18 19:24:47 -07:00
Jeff Young 1996fba8a6 Check for a tree selection before checking it against the board item.
Fixes: lp:1833295
* https://bugs.launchpad.net/kicad/+bug/1833295
2019-06-19 00:11:23 +01:00
Wayne Stambaugh a6bbe907ee Set about dialog name for 3D viewer frame.
(cherry picked from commit 2f2c358aef)
2019-06-18 15:32:09 -04:00
Wayne Stambaugh 43579f4c02 Minor library identifier validator change.
Use the wxTextValidator style flag to allow the user to clear the library
identifier string.  Use wxTextValidator::SetStyle( wxFILTER_EMPTY ) to
prevent empty library identifier strings which is the current behavior.

(cherry picked from commit 9f9e87f11f)
2019-06-18 12:16:51 -04:00
Seth Hillbrand 909a25c147 pcbnew: Correct polygon flipping in custom pads
Custom pads are referenced to the anchor pad 0-point, so flipping the
polygon should be about 0 and not the flip point.

Fixes: lp:1831311
* https://bugs.launchpad.net/kicad/+bug/1831311
2019-06-17 15:26:56 -07:00
Wayne Stambaugh aa3aafc4ff Eeschema: fix sheet plotting bug.
Prefix the sheet name with "Sheet: " and the sheet file name with "File: "
when plotting so that it matches the display sheet rendering.

Improve the root sheet plot file name.

Fixes lp:1832081

https://bugs.launchpad.net/kicad/+bug/1832081
(cherry picked from commit 7235da0979)
2019-06-17 17:02:21 -04:00
Seth Hillbrand b32439a694 Plotting: Handle mask transparency
This handles images with transparent colors by mapping the transparent
color to white.  This only works when plotted into the background.
2019-06-17 13:27:58 -07:00
Seth Hillbrand ddbc25077c Eeschema: Plot in same order as drawing
This ensures the junctions are on top and the bitmaps are on bottom
2019-06-17 13:27:11 -07:00
Seth Hillbrand b075886b19 DC printing: Place worksheet behind schematic
And place bitmaps behind other items.  This ensures they are drawn in
the background of the page rather than covering schematic elements.

This also hacks around the buggy wxPostScriptDC implementation that
resets the page to print an image.

Fixes: lp:1819934
* https://bugs.launchpad.net/kicad/+bug/1819934
2019-06-17 13:03:00 -07:00
Wayne Stambaugh eae999a85a Eeschema: allow empty field strings in field table editor.
The grid apply code was always preventing empty fields.  Change this the
broken behavior to allow any field to be empty except the reference and
value fields.

Fixes lp:1832722

https://bugs.launchpad.net/kicad/+bug/1832722
(cherry picked from commit d74ec1a1b2)
2019-06-17 15:06:27 -04:00
Seth Hillbrand 77f0799750 Print bitmaps using BW setting
When selecting the "Print in B&W", all items on the schematic should be
printed using black and white.  This converts the embedded images
greyscale before outputting to the printer
2019-06-17 09:54:52 -07:00
jean-pierre charras 8de93ad8b4 Eeschema: fix incorrect size of junctions on screen.
Fixes: lp:1831931
https://bugs.launchpad.net/kicad/+bug/1831931
2019-06-17 18:08:44 +02:00
Ian McInerney b377b5bbed pcbnew: Fix invalid hotkeys 2019-06-17 08:11:01 -04:00
Seth Hillbrand 75b5324762 Eeschema: Allow junction dots to be hidden
Drawing junction dots at the line width allows users who do not like
them in their schematics to avoid having them drawn.
2019-06-17 04:48:10 -07:00
Wayne Stambaugh 610d200e8a Fix spelling error in symbol library table warning string.
(cherry picked from commit be8fe3884f)
2019-06-16 12:28:56 -04:00
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
Seth Hillbrand 9496b57b01 tool_mgr: Don't invalidate our own iterators
Re-arranging the stack will invalidate the iterator that is removed and
inserted (begin()).  Because this is not a threaded operation, we can
only do it to ourselves, so check that the operation isn't a NOP before
performing.

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

(cherry picked from commit 552815d486)
2019-06-15 17:49:52 -07:00
jean-pierre charras a5cd5844ec Fix invalid wxImageList build.
Fixes: lp:1832905
https://bugs.launchpad.net/kicad/+bug/1832905
2019-06-15 16:08:07 +02:00
Ian McInerney da16b479a0 Make DXF monochrome output only contain Black layer
Fixes: lp:1832359
* https://bugs.launchpad.net/kicad/+bug/1832359

(cherry picked from commit dc56678289)
2019-06-13 16:10:17 -07: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
Seth Hillbrand a84ca5b147 cmake: Further petting dependencies
eeschema cpp files consume generated header files that have targets in
the common directory, so no dependencies get created from eeschema.  We
add the dependencies in common to force the setting through libraries.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-13 16:09:45 -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
Ian McInerney 2aa8e444ee Added hotkey validity checking to the preferences menu 2019-06-13 13:53:04 -04:00
Steven A. Falco cfa187f477 Show the current grid setting. 2019-06-13 12:14:41 -04:00
Wayne Stambaugh 1ed411e431 LibEdit: fix library tree refresh issue when library is removed.
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view.  Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().

This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table.  Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.

Fixes lp:1821691

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

(cherry picked from commit 028973d182)
2019-06-13 08:59:26 -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 0ee38653f7 Fix default User Template location
When we assign a string to the wxFilename, it takes the last section as
the filename (unless there is a trailing '/').  So on Linux, we got
/home/user for the Documents dir and /home/ was the directory while
'user' was the filename.  Appending directories 'kicad/templates' made
the final directory '/home/kicad/templates'.  Forcing this to be a
directory restores correct behavior.
2019-06-11 13:46:10 -07:00
Seth Hillbrand df89b5bf8a eeschema: Don't extend the block when finalizing action
The block draw function is called during the mouse capture callback.  It
shouldn't be called after the block size is finalized.

Fixes: lp:1832289
* https://bugs.launchpad.net/kicad/+bug/1832289
2019-06-11 12:17:25 -07:00
Seth Hillbrand cca4037fec CMake: Another go at linear dependencies
This simplifies the linear dependencies for custom targets.  Should be
single shot for make this time.

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

(cherry picked from commit 720889edd0)
2019-06-10 14:55:01 -07:00
jean-pierre charras e015da8d95 Add a search path to allow find ngspice include dir on some msys2 installs 2019-06-10 20:42:21 +02:00
jean-pierre charras 4ceb186251 Eeschema: fix incorrect saving in prj config on the default netlist format. It was not always saved, and this was not the default, but the last used format. 2019-06-10 20:37:34 +02:00
Seth Hillbrand 370109b868 Eagle: Fix stacked NC pin import
Since Eagle does not connect stacked NC pins but KiCad will if the pins
are coincident, we choose to only import the first of the stacked NC
pins.  While this creates symbols that are slightly different in pin
count from the Eagle version, it keeps the schematic and netlist
functionally correct relative to the Eagle version.

Fixes: lp:1821319
* https://bugs.launchpad.net/kicad/+bug/1821319
2019-06-09 17:02:46 -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 98e68cd66a Adding MIT license
The tinyspline library is under MIT, so needs to be included in our
license bundle.
2019-06-09 08:38:54 -07:00
jean-pierre charras 407301a28c Fix issue in cairo_gal when drawing a 360 deg arc (in fact a circle). It was due to a angle normalization between -360 and 360 degrees. So, in arcs, if the start angle and end angle diff is n*360 deg, this normalization gives start angle = end angle. The fix forces end angle = start angle+360deg in this case.
Fixes: lp:1832096
https://bugs.launchpad.net/kicad/+bug/1832096
2019-06-09 11:09:43 +02: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 f1704fd61a bitmap2component: Fix logic for alpha mask
For POTRACE, black is the foreground and white is the background.  We
should keep the convention by requiring the pixin to be less than the
black threshhold as well as the alpha to be at least the alpha
threshhold.

Fixes: lp:1821563
* https://bugs.launchpad.net/kicad/+bug/1821563
2019-06-08 12:03:48 -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 fb85612f81 eagle: Strip newlines from description
Eeschema old format is line-terminated so the newlines in descriptions
will break the schematic file if saved.

Fixes: lp:1829707
* https://bugs.launchpad.net/kicad/+bug/1829707
2019-06-07 22:08:06 -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
jean-pierre charras 1113e18c40 Fix incorrect initialization of some menuitems IDs.
Although is is currently working, it is a potential issue.
2019-06-06 08:01:24 +02:00
Jon Evans 02947345e8 Mathplot: properly set foreground color when saving screenshots
Fixes: lp:1810914
* https://bugs.launchpad.net/kicad/+bug/1810914

(cherry picked from commit 27a5ed1a9f)
2019-06-05 22:44:18 -04: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