Commit Graph

7187 Commits

Author SHA1 Message Date
John Beard bb18c9201b Make SVG import a CMake option (experimental)
This allows too turn it on for work without an additional patch.

Also fix a bug in the disable code - when the SVG is enabled,
allow to select SVG files.
2018-12-04 18:53:28 +01:00
Seth Hillbrand 8757fcf676 Add array hint to wxArrayString contructors
This may be required for some compilers to prevent premature casting to
a single element.
2018-12-04 09:47:43 -08:00
jean-pierre charras 2ec957a226 polygon_triangulation.h: fix a missing call to updateList() in TesselatePolygon. 2018-12-04 15:47:54 +01:00
Maciej Suminski ecff2ed384 SVG import dialog: make placement options mutually exclusive 2018-12-04 08:39:58 +01:00
Seth Hillbrand 2a574c4f65 pcbnew: Synchonize net info when loading via python
When loading the load using the UI, netclasses and net info are
synchronized to the board object after parsing the file.  This needs to
happen automatically when loading the board via the Python interface as
well.

Fixes: lp:1806506
* https://bugs.launchpad.net/kicad/+bug/1806506
2018-12-03 17:05:18 -08:00
jean-pierre charras af65c48979 Pcbnew: Partial revert of commit 0bceb69fe9
In DRAWSEGMENT polygonal shape: the commit tried to use triangulation (CacheTriangulation) to draw the shape (similar to zones).
It was much faster than using GLU tesselator (one order of magnitude).
Unfortunately, CacheTriangulation() works only with simple polygons, not with any polygon.
And simplifying a polygon with a lot of vertexes is very time consuming.
So using CacheTriangulation() is now removed and GLU tesselator is used as previously.

Fixes: lp:1806411
https://bugs.launchpad.net/kicad/+bug/1806411
2018-12-03 20:12:57 +01:00
Seth Hillbrand 2a865ef4b6 pcbnew: Remember highlighted net while routing
If the user has specifically requested a net to be highlighted before
routing, we keep the net highlighted after the route is completed.
2018-12-03 08:42:45 -08:00
jean-pierre charras a762c4d86e Import GFX: temporary disable SVG import until V6.0.
SVG import need some refinements to be efficient, so it is disable for v 5.x.
Will be re-enabled later.
Enabling SVG import is *only* for developers, not for users.
2018-12-03 15:31:40 +01:00
jean-pierre charras fb5b5ff7c3 nanosvg: Update nanosvg. Move the code to compile from nanosvg.h to nanosvg.cpp
Uncrustify this code.
2018-12-03 15:25:46 +01:00
jean-pierre charras cc0aa8b928 Gfx import: fix many issues, and add many enhancements.
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.
2018-12-03 15:25:44 +01:00
jean-pierre charras 430c61822d Import svg import code from experimental trunk: convert dxf importer 2018-12-03 13:42:23 +01:00
jean-pierre charras 74a9d5401a Import svg import code from experimental trunk: start point 2018-12-03 13:42:22 +01:00
jean-pierre charras 0bceb69fe9 Pcbnew: DRAWSEGMENT polygonal shape: use triangulation (CacheTriangulation) to draw the shape (similar to zones).
On opengl, creating triangles by CacheTriangulation instead of GLU tesselator is much faster (one order of magnitude)
2018-12-02 18:05:25 +01:00
Seth Hillbrand 26765161c1 drc: Add board outline and edge crossing
This adds a check for contiguous board outlines to the DRC.  It also
uses the calculated outline to ensure that traces are not crossing the
outlines.

Fixes: lp:1648055
* https://bugs.launchpad.net/kicad/+bug/1648055
2018-12-02 07:54:52 -08:00
jean-pierre charras 5eb5b5ce58 DIALOG_TEXT_PROPERTIES: hide visibility option, because this option exists only for footprint texts, and do nothing for other texts.
Texts on board (not on footprints) cannot be invisible, at least in 5.0 and previous versions.
2018-12-02 10:30:48 +01:00
jean-pierre charras d607c4853d fix a minor compil warning. 2018-12-01 20:07:59 +01:00
Jeff Young 45ee95f5e2 Apply CharHook uniformly as other platforms appear to have issues.
Fixes: lp:1806124
* https://bugs.launchpad.net/kicad/+bug/1806124
2018-12-01 11:57:16 +00:00
Jeff Young ff6a3482ec Remove on-kill-focus-validation.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-29 19:00:21 +00:00
Wayne Stambaugh 59b0f553e0 Code cleaning. 2018-11-28 09:58:41 -05:00
Jeff Young 8ca0fe6722 When copying modified footprint make sure we get the latest.
Fixes: lp:1805413
* https://bugs.launchpad.net/kicad/+bug/1805413
2018-11-27 19:20:36 +00:00
Seth Hillbrand 7b2f245283 pcbnew: Tracks cleanup use connectivity database
Rather than duplicating the connectivity calculations in determining
whether a track is dangling, we utilize the current database to find the
number of connected items for an anchor item when feasible.

Multiple anchors such as tracks still need additional logic.

Fixes: lp:1805479
* https://bugs.launchpad.net/kicad/+bug/1805479
2018-11-27 11:17:59 -08:00
Jeff Young db07b43674 Fix copy/paste errors with wrong icons.
Fixes: lp:1805123
* https://bugs.launchpad.net/kicad/+bug/1805123
2018-11-26 23:57:08 +00:00
Maciej Suminski 4d73cfb8a1 PNS: validate SHAPE_LINE_CHAIN before accessing its segments 2018-11-26 00:01:02 +01:00
Seth Hillbrand 4a0467bbd0 Selection: allow optional locked item edit
When looping main, we should not exclude locked items without prompting
the user first.

Fixes: lp:1804979
* https://bugs.launchpad.net/kicad/+bug/1804979
2018-11-25 11:54:29 -08:00
Seth Hillbrand 2cfcb2b9fb SELECTION: Allow RequestSelection() to add items
The client filter might add items in the case where locked pads are
filtered.  We need to handle this case when requesting selection by
adding new items to the m_selection

Fixes: lp:1802686
* https://bugs.launchpad.net/kicad/+bug/1802686
2018-11-25 08:33:49 -08:00
Jeff Young d2756bedf1 Keep state except when the filter changed.
(Used to be "except when filtering".)

Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293
2018-11-25 01:51:45 +00:00
Seth Hillbrand ff668968f3 pcbnew: Changing the track width while routing
When changing the track width, we need to allow that the track's route
will change based on DRC, so force a move without changing position.

Fixes: lp:1785057
* https://bugs.launchpad.net/kicad/+bug/1785057
2018-11-24 11:52:26 -08:00
jean-pierre charras 558c38b5c5 Very minor enhancement in plot dialog.
Inside the layers listbox, the context menu can select all fabrication layers.
The courtyard layers (only used for DRC) are now not selected.
2018-11-24 17:48:05 +01:00
Seth Hillbrand 908c2a37e5 GRID_HELPER: Finish drawing closed path
When we draw a path, we usually want to close the path when clicking on
the end of another line.  This uses grid helper to ensure this
progression happens as expected.
2018-11-24 08:00:11 -08:00
Jeff Young 2e1920abad Add tooltips to library manager dialogs.
Fixes: lp:1804930
* https://bugs.launchpad.net/kicad/+bug/1804930
2018-11-24 15:06:21 +00:00
Jeff Young b2db49f4ac Add browse buttons to Library Manager dialogs.
Fixes: lp:1804924
* https://bugs.launchpad.net/kicad/+bug/1804924
2018-11-24 15:06:21 +00:00
jean-pierre charras 0b890b4d1d Drill files generation: add 3 structured comments in NC (Excellon) drill files and remove duplicate code. 2018-11-24 08:51:58 +01:00
Jeff Young 647fa6547d Update grid drop-down when changing user grid. 2018-11-23 23:33:02 +00:00
Jeff Young f05b756ccf Fix copy/paste typo. 2018-11-23 19:46:41 +00:00
Seth Hillbrand 9955d0beb2 MSW Ratsnest: Force marking ratsnest dirty
When updating the status of the ratsnest, we mark its target layer as
dirty to ensure the revised data are used to draw/clear the ratsnest

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

(cherry picked from commit 50eedcf0b3)
2018-11-23 11:45:29 -08:00
jean-pierre charras 149c4b55a6 DIALOG_TRACK_VIA_PROPERTIES_BASE: fix a minor wxWidgets alert. 2018-11-23 15:46:54 +01:00
Seth Hillbrand 36a69a7d5d clipboard: re-add limited LOCALE_IO to SaveSelection
JP notes that there is an issue with comma-based decimal locales and the
SaveSelection that is addressed by having a LOCALE_IO call in a limited
block.

This changed the copy timing of the clipboard and the interaction with
KDE Klipper again.  To address this, we isolate the clipboard open call
to the end of the routine and force a round-trip of the clipboard data
before exiting.
2018-11-22 08:17:09 -08:00
jean-pierre charras d03e82602e PANEL_COMMON_SETTINGS: minor fixes, mainly cosmetic. 2018-11-22 17:11:49 +01:00
Seth Hillbrand 964d6ebc06 pcbnew: Set clipboard locale to avoid Klipper crash
Klipper seems to poll at odd times.  When we copy to wxTheClipboard
in one locale and Klipper extracts data in a different locale, it throws
an XError.  We don't need the extra LOCALE_IO calls as Format() uses its
own LOCALE_IO setting.

Fixes: lp:1800648
* https://bugs.launchpad.net/kicad/+bug/1800648
2018-11-21 12:01:21 -08:00
nats 6e77176d76 Adding fillet option for the QFN Wizard
Fixes lp:1775961

https://bugs.launchpad.net/kicad/+bug/1775961
2018-11-21 15:00:39 -05:00
Jeff Young 5a74b55074 Reset delayedFocusPage even if it's already the right page.
Fixes: lp:1804315
* https://bugs.launchpad.net/kicad/+bug/1804315
2018-11-21 19:51:04 +00:00
Seth Hillbrand ad9916a93d ratsnest: Fix state issue switching in local tool
The ratsnest layer needs to be always enabled in GAL rather than taken
from the board settings.  This also adds a finalize handler to the
picker tool that allows a picker-caller to perform a specific action
when the picker tool exits.  In this case, we use it to clear the local
ratsnest selections back to the default.

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

(cherry picked from commit c0d9b9ab81)
2018-11-20 20:49:18 -08:00
Jeff Young ed27027ab1 Escape/unescape footprint descriptions and keywords when writing/reading cache file.
Fixes: lp:1803989
* https://bugs.launchpad.net/kicad/+bug/1803989
2018-11-20 21:44:04 +00:00
Jeff Young c016861962 Run some sanity checks on fp-info-cache files.
Fixes: lp:1803989
* https://bugs.launchpad.net/kicad/+bug/1803989
2018-11-19 21:06:25 +00:00
Jeff Young 5bb5aea936 Don't leave a selection with a deleted item in it.
Fixes: lp:1803730
* https://bugs.launchpad.net/kicad/+bug/1803730
2018-11-19 16:03:30 +00:00
Jeff Young f71998b34e Remove repetitive calls to other cancel operations. 2018-11-19 16:03:30 +00:00
Jeff Young 5b9458f4c2 Don't delegate context menu to Selection Tool.
Our superclass can handle it more correctly (including the Cancel
item at the top).
2018-11-19 16:03:30 +00:00
jean-pierre charras 240051fb26 Worksheet display in GAL mode: fix missing filename and (in Eeschema) sheet full name. 2018-11-19 10:21:28 +01:00
Seth Hillbrand eb689a5221 Ratsnest: Improve show heuristics
When the local ratsnest tool is used, it should toggle the state based
on the global ratsnest visibility.  After changing state, the layer
cache is marked as well.

Possibly related to lp:1800301

(cherry picked from commit 22fbf30f22)
2018-11-18 20:03:46 -08:00
jean-pierre charras c539d6e0be fix incorrect initialization of VIEW::m_boundary.
This parameter defines the working area (full page) size.

The fix is not perfect, because it does not take in account the page size.
However it is similar to the "old" initialization, before Eeschema GAL.
In Eeschema, a reasonable boundary size is used.
2018-11-18 20:04:17 +01:00