Commit Graph

13481 Commits

Author SHA1 Message Date
jean-pierre charras 24ab8141ae Gerber output: fix a potential minor issue in a G04 line comment.
In gbr files only ASCII7 chars are allowed.
However, in a comment line a UTF8 string is used. It should not create issues, but it is incorrect.
2019-01-27 10:11:03 +01:00
jean-pierre charras 7848c3acf3 Fix cross-probing issue (not working) when a net name or a pin name contains a space. 2019-01-24 16:59:34 +01:00
jean-pierre charras 752cc43fb8 Fix 2 minor wxWidgets alerts. 2019-01-21 19:53:40 +01:00
jean-pierre charras cf5d3ae43f Pcbnew: fix missing initialization in PCB_PAINTER::draw( const TRACK* aTrack, int aLayer )
the stroke mode was always activated, even in fill mode. creating incorrect size shape for null length track segments.
2019-01-20 10:10:18 +01:00
jean-pierre charras e22113ccef * Toolbars with wxChoice: Fix incorrect ReCreate Toolbar methods: they recreated these wxChoice without deleting the previously created.
This issue created memory leak and not working wxChoice (for instance after modifying the language selection).
Now, they are created only once, never recreated.
2019-01-20 10:07:23 +01:00
joel-bertrand-JKB 35dc387fc6 Fix duplicate directives in Spice netlist inside .control ... .endc
Fixes: lp:1812082
https://bugs.launchpad.net/kicad/+bug/1812082
2019-01-16 19:54:55 +01:00
Wayne Stambaugh 025578fee7 Do not set wxSetAssertHandler on non-debug builds.
Fixes lp:1809622

https://bugs.launchpad.net/kicad/+bug/1809622
2019-01-15 09:34:32 -05:00
Wayne Stambaugh 45a3d86d36 Eeschema: fix schematic symbol parsing bug.
Schematic symbol library link names are unquoted strings that can
contain non-ascii characters which breaks the parser.  Converting
the line to uft-8 before breaking the string into tokens resolves
the issue.

(cherry picked from commit b8de4e73bf)
2019-01-08 12:26:21 -05:00
Wayne Stambaugh 9f1b6680a2 Eeschema: fix library symbol pin definition parsing bug.
Pin names are unquoted strings that can contain non-ascii characters
which breaks the parser.  Converting the line to uft-8 before breaking
the string into tokens resolves the issue.

(cherry picked from commit 742961119d)
2019-01-08 12:25:24 -05:00
Wayne Stambaugh 385eb49cb2 Fix schematic append clear annotation bug.
Clear the annotation of only the appended schematic and any sheets in it's
hierarchy.  Do not clear the annotation of the symbols in the target sheet.

Fixes lp:1805695

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

(cherry picked from commit 07ebc4df14)
2019-01-08 11:55:05 -05:00
Wayne Stambaugh 61b94c8c2c Eeschema: fix UTF8 character handling bug in legacy parser.
Iterating over unquoted strings as ASCII8 fails when ' ' character is
not the LSB of a UTF8 string with wide characters.  Change parsing method
for unquoted strings to convert the entire line as UTF8 and then use
wxStringTokenizer to break the line into tokens at the ' ' characters.

Fixes lp:1806206

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

(cherry picked from commit a61a51f26e)
2019-01-08 11:54:48 -05:00
Seth Hillbrand 4aeef1e09e pcbnew: Check for valid pointer before deref
In legacy toolkit, we do not keep the corner pointers, so dereferencing
causes crashes.

Fixes: lp:1808852
* https://bugs.launchpad.net/kicad/+bug/1808852
2018-12-19 16:53:40 -08:00
jean-pierre charras 93caff0ac1 Remove overzealous assert. 2018-12-16 09:30:30 +01:00
jean-pierre charras 4e3fe6c55d Make DRC markers always selectable.
Fixes: lp:1808181
https://bugs.launchpad.net/kicad/+bug/1808181
2018-12-16 09:30:29 +01:00
Jeff Young 9240a54f4a Allow marker selection in high-contrast mode.
Fixes: lp:1793357
* https://bugs.launchpad.net/kicad/+bug/1793357

(cherry picked from commit 04534c83e0)
2018-12-12 12:15:25 -08:00
jean-pierre charras 4e04468e47 Eagle(.lbr) footprints not listed in Library Browser
Fixes: lp:1807629
https://bugs.launchpad.net/kicad/+bug/1807629
2018-12-11 16:07:26 +01:00
jean-pierre charras 857d038b5d Gerber viewer: Ensure arc interpolation is used only after a arc command. Remove also non existing G command codes. 2018-12-09 18:21:54 +01:00
jean-pierre charras ec1eaf5d2d Gerbview small fix to speed up opengl canvas switch 2018-12-09 18:21:27 +01:00
jean-pierre charras 7134b1c83f Gerber plotter: remove a G01 useless command, and ensure this command exists in plot polygon. 2018-12-09 18:17:47 +01:00
jean-pierre charras bc8739f930 Eeschema: fix incorrect parsing of line color (r v b values). Only the R and V were read, the parsing was stopping before reading the B value. 2018-12-09 18:16:50 +01:00
Maciej Suminski 805bb3160f Fix for dark mode on macOS Mojave
Thanks to Scott Rapson and Justace Clutter for the solution.

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

(cherry picked from commit 766156ed87)
2018-12-07 14:29:22 +01:00
Jeff Young 187d7729ff Don't go to '-' numbering till the range reaches 3.
(cherry picked from commit c4ff17d3ec)
2018-12-03 18:49:03 +00:00
Jeff Young 940b08ab85 Sort references before removing duplicates.
std::unique only works within consecutive blocks, so the list must
be sorted first.  (We need it sorted in the end anyway, so no
big deal.)

(cherry picked from commit 90df7a8b22)
2018-12-03 18:48:37 +00:00
Jeff Young e8c8bf8d11 Fix range-based reference formatter.
Fixes: lp:1792483
* https://bugs.launchpad.net/kicad/+bug/1792483

(cherry picked from commit 243b05b2c3)
2018-12-03 18:48:06 +00:00
Wayne Stambaugh 5d8c3e5033 Start release version 5.0.3 development. 2018-11-26 18:09:49 -05:00
Wayne Stambaugh ec5ed68af8 Tag release version 5.0.2. 2018-11-26 17:59:28 -05:00
jean-pierre charras f66ccfb64f 3D viewer: Fix hanging when a board is displayed in non realistic mode and the body is not shown. 2018-11-26 15:59:54 +01:00
jean-pierre charras 7eac7dcdcb dialog_3D_view_option_base.cpp: fix a minor wxWidgets alert. 2018-11-26 15:59:54 +01:00
Maciej Suminski 1b1a3763d2 PNS: validate SHAPE_LINE_CHAIN before accessing its segments
(cherry picked from commit 4d73cfb8a1)
2018-11-26 08:27:27 +01:00
Seth Hillbrand 50eedcf0b3 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
2018-11-23 11:44:33 -08:00
Seth Hillbrand 62561292e9 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.

(cherry picked from commit 36a69a7d5d)
2018-11-22 08:17:38 -08:00
Jeff Young 03132cabee Make sure original part record always has the write library nickname.
Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293

(cherry picked from commit 023a445e9f)
2018-11-21 23:24:13 +00:00
Seth Hillbrand 82c9e54735 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

(cherry picked from commit 964d6ebc06)
2018-11-21 12:03:11 -08:00
Seth Hillbrand c0d9b9ab81 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
2018-11-20 20:13:15 -08:00
Jeff Young daf4985a60 Don't trim entire wires.
Fixes: lp:1804297
* https://bugs.launchpad.net/kicad/+bug/1804297

(cherry picked from commit ae6989f3a1)
2018-11-20 22:03:04 +00:00
Seth Hillbrand b1805dd254 Ratsnest: Force update after modifying visible nets
After adjusting the ratsnest, we force the view update to re-draw the
ratsnest to the screen.  This is not required for Linux but seems to
have no ill effects and may help MSW show local ratsnest changes.

Possibly related to lp:1800301
2018-11-19 21:12:47 -08:00
Jeff Young 66b0aca696 Don't leave a selection with a deleted item in it.
Fixes: lp:1803730
* https://bugs.launchpad.net/kicad/+bug/1803730

(cherry picked from commit 5bb5aea936)
2018-11-19 16:07:41 +00:00
Seth Hillbrand 22fbf30f22 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
2018-11-18 19:57:37 -08:00
Mario Luzeiro f3d1f31e1d Fixes 3D Viewer: Raytracing line artifact, lp:1680530 2018-11-14 09:53:39 -05:00
jean-pierre charras 9610f8f208 NC drill (Excellon) exporter: remove useless M71 / M72 lines. They are probably incorrect in V2 format, and the format is already specified. 2018-11-11 20:29:48 +01:00
jean-pierre charras 76adf7dbe8 Gerbview: NC drill file reader: add support for routing mode, used by latest Kicad version.
From master branch commit 4136aca221
2018-11-10 10:28:37 +01:00
jean-pierre charras 3f32f0be9e Gerbview: minor fixes from master branch. 2018-11-10 09:29:21 +01:00
Seth Hillbrand a77caa6baa pcbnew: Connectivity threads update
This is a melded cherry-pick of the following commits from 5.1

59fb6d8851
ed1c8eee9e
4a730e6c54

This implements the std::async connecitivty and locking for the 5.0
branch
2018-11-07 12:33:30 -08:00
Seth Hillbrand 0b5ca1a883 ratsnest: Move ratsnest connectivity to async
This a partial pick of 59fb6d8851 but
revised for the 5.0.x branch.
2018-11-07 12:21:26 -08:00
jean-pierre charras 839ade2c05 Gerber job file: fix incorrect GUID.
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:17:22 +01:00
jean-pierre charras 922ce89643 3D viewer: ensure 0 sized circles (that crash the viewer) are skipped. 2018-11-05 08:39:00 +01:00
Seth Hillbrand 78f7ba10ef pcbnew: Prevent degenerate values in Eagle import
Importing Eagle files allowed for invalid zone values for clearance and
minimum width that triggered asserts in the 3d-viewer.

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

(cherry picked from commit df562b7ec0)
2018-11-04 11:03:00 -08:00
Maciej Suminski dd39599903 Link eeschema with ngspice DLL
Adds a link-time dependency for libngspice, so that other tools may
detect ngspice as a KiCad dependency.

The library is still loaded with dlopen() as it gives a way to reload it
in case of problems. The DLL name is recognized during CMake
configuration and used to load the library at runtime.
2018-10-30 08:40:29 +01:00
jean-pierre charras dba32717b1 DIALOG_PLOT_BASE: Fix a minor wxWidgets alert. 2018-10-29 20:46:00 +01:00
jean-pierre charras 57800b934e Kicad, Windows specific: disable a overzealous wxWidgets assert when reading a file.
When reading (and writing) a file, we must switch the current locale to "C" for LC_NUMERIC.
Unfortunately, on Windows, a wxWidgets assert was shown when reading some items (bitmaps images).
This wxWidgets assert (related to decimal separator) is overzealous and is now hidden only when reading/writing files.
2018-10-29 20:34:48 +01:00