Commit Graph

13436 Commits

Author SHA1 Message Date
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
jean-pierre charras 4daaaa373c Pcbnew, Gerber output: fix incorrect UUID format in %TF.ProjectId attribute.
Fixes: lp:1800459
https://bugs.launchpad.net/kicad/+bug/1800459
2018-10-29 18:57:39 +01:00
Stefan Brüns 36bb92f844 Use fixed version for libngspice.so.0
CanonicalizeName only adds the lib prefix and .so suffix, so loading
libngspice.so fails until the development package is installed.
MAC/Windows code paths lookup soversion 0 of ngspice as well, as this
is the only compatible version.
2018-10-27 10:57:08 +02:00
Wayne Stambaugh d95ab28db9 Update appdata license fields to reflect the latest license changes. 2018-10-24 11:06:01 -04:00
Wayne Stambaugh 09616fff7a Update license to AGPL due to TTL license.
The decision to include the TTL library make KiCad a derivative work
under the terms of the AGPL version 3 or later license.

Add both the GPL3 and AGPL3 license text files and add a readme file
about the KiCad licensing.  Contributing to KiCad still falls under
the GPL3+ license.

Fixes lp:1797095

https://bugs.launchpad.net/kicad/+bug/1797095
2018-10-24 10:00:10 -04:00
Jeff Young f87a22fefb Add missing radio button to group.
Fixes: lp:1799654
* https://bugs.launchpad.net/kicad/+bug/1799654
2018-10-24 13:35:55 +01:00
Seth Hillbrand 2701bdbbac Prevent excess precision errors on 32-bit builds
The compile flag -ffloat-store requires floating point values to be
stored in memory rather than in registers to prevent errors when two
numbers are compared that were stored in different locations.

(cherry picked from commit 40c70dd008)
2018-10-23 19:25:50 -07:00
Michael Kavanagh 49753d9dad Update Eeschema BOM dialog html help text
Now links to relevant section in stable eeschema docs.

Fixes: lp:1798248
https://bugs.launchpad.net/kicad/+bug/1798248
2018-10-22 13:21:38 -04:00
jean-pierre charras 272b477e91 Opengl: avoid useless wxASSERT when a char is not found in font used to display netnames/padnames
They are replaced by '?'
It happens for some esoteric unicode chars.
2018-10-20 18:50:15 +02:00
jean-pierre charras e453b5b87b Page layout bitmap size wrong in modern/GAL canvases.
The image scale set by pl_editor was not taken in account when drawing the page layout.
2018-10-20 18:31:19 +02:00
jean-pierre charras c08d3baf8c Gerber file generation: remove a optional info in .FileFunction: the layer type. TF.FileFunction,Copper,L1,Top,Signal is now TF.FileFunction,Copper,L1,Top
This param is not useful, and probably never correctly set by users, because is is not used by Pcbnew.
(It is used only for dsn export)
2018-10-19 18:47:23 +02:00
Maciej Suminski 3d9e6867cf Spice netlist exporter: handle multiline directives
Fixes: lp:1797937
* https://bugs.launchpad.net/kicad/+bug/1797937

(cherry-picked from 9757107b)
2018-10-19 17:34:14 +02:00
jean-pierre charras bd1b15ded7 Eeschema, spice netlist exporter: fix an issue that converted spice string commands to lowercase.
Therefore, it can breaks some commands, especially filenames.

Partial fix of bug 1797937.

(cherry-picked from 8f9b0f02)
2018-10-19 17:00:11 +02:00
jean-pierre charras 8f87aae99e Page layout editor: fix a bug in GUI: the PPi setting was not displayed for bitmap items 2018-10-19 13:51:41 +02:00
Seth Hillbrand 43987cc50c UTF8: Fix MSVC builds
MSVC does not support variable length arrays.  Substitute a std::vector
instead.

(cherry picked from commit 6d8a759c75)
2018-10-18 11:50:04 -07:00
Seth Hillbrand 6106210c87 UTF8: Correct MSW issue with previous commit
Linux does not handle the resize command with wide-character extended
table UTF-8.  The solution did not work for W7-32bit.  This is a
compromise, attempting first the preferred, previous solution and
falling back to the secondary solution.
2018-10-17 12:12:49 -07:00
Seth Hillbrand b37bc69476 UTF8: Utilize the safe conversion from wchar
Invalid wchar characters would throw an exception.  We need a defined
output from the += operator, even for unknown character.

Fixes: lp:1798144
* https://bugs.launchpad.net/kicad/+bug/1798144
2018-10-16 16:36:42 -07:00
Seth Hillbrand cccf4cf20b pcbnew: Fix crash when removing polygon corners
GetSelectedRows() returns -1 when no rows are selected.

Fixes: lp:1798095
* https://bugs.launchpad.net/kicad/+bug/1798095
2018-10-16 09:08:03 -07:00
John Beard 99549f816f QA: Remove obsolete fillet refactor tests
These tests are fundamentally broken as they test two fillet
implementations against each other, but the two implementations
no longer have the same interface or meaning (one has a fixed
segment count, one has a fixed error).

This also allows the tests to run on Boost <1.59, which do not
provide the !-syntax for excluding tests. Ubuntu 16 uses
Boost 1.58, so this causes build failures.

Fixes: 1785377
https://bugs.launchpad.net/kicad/+bug/1785377
2018-10-16 09:40:06 -04:00
Seth Hillbrand e34dc4abb1 Revert "pcbnew: Fix memory leak in Eagle importer"
This reverts commit a5bdee747a.
2018-10-14 06:47:20 -07:00
jean-pierre charras 82b37a5cbe Fix an issue (items inside FOOTPRINT_WIZARD_FRAME not displayed) when a more recent Kicad version was run.
This is due to use  of LoadPerspective() that creates many issues when a frame structure changes.
The call to this useless method is just removed.
2018-10-13 10:10:15 +02:00
jean-pierre charras 561dc052ff Update FootprintWizardBase.py according to recent changes in API 2018-10-13 09:39:49 +02:00
jean-pierre charras 553b529fd4 Gerbview: fix a overzealous wxASSERT
Fixes: lp:1796744
https://bugs.launchpad.net/kicad/+bug/1796744
2018-10-09 08:47:16 +02:00
Wayne Stambaugh 7573c6a4e4 Start release version 5.0.2 development 2018-10-08 17:45:02 -04:00
Wayne Stambaugh c000d70a51 Tag release version 5.0.1 2018-10-08 17:14:38 -04:00
Seth Hillbrand 234b01905d eeschema: fix mistaken wire removal bug
The wire between two points should not be trimmed if it starts or ends
on one of the component's connection points.

(cherry picked from commit d2906f7975)
2018-10-08 11:35:12 -07:00
Seth Hillbrand a5bdee747a pcbnew: Fix memory leak in Eagle importer
unqiue_ptr release creates a memory leak unless the returned pointer is
freed.

(cherry picked from commit 45d438cd13)
2018-10-08 11:35:05 -07:00
Seth Hillbrand 9977d0d737 pcbnew: fix pad distance calc in gateways
The pad distance was fixed to 0, making the gateway priority set
artificially to 1

(cherry picked from commit 77eeda4191)
2018-10-08 11:34:46 -07:00
Seth Hillbrand 46f7011463 pcbnew: Zone selection heuristic continuity for edge
If the user is carefully selecting the zone edge, we do not filter the
zone preemptively from our disambiguation list in the same manner as we
do for selecting on zone copper.

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

(cherry picked from commit f11cb736e5)
2018-10-08 11:34:38 -07:00
Wayne Stambaugh 876232aa7a Fix LIB_ID illegal character tests.
The '/' and ':' are reserved and cannot be used in symbol or footprint
names.  They will cause the LIB_ID parser and formatter to fail.  While
it seems like they should be legal in symbol alias names, they will
trigger a symbol rescue the next time the schematic is loaded.

Use ID_SCH as in the Eagle schematic plugin rather than ID_ALIAS to
ensure symbol names do not need rescued the next time the schematic is
opened.

Remove ID_ALIAS since the rules for alias names are the same as the
rules for symbol names.  Otherwise, allowing '/' and ':' in alias names
will force a symbol rescue on the next schematic load.

Fixes lp:1795600

https://bugs.launchpad.net/kicad/+bug/1795600
2018-10-07 15:35:16 -04:00
jean-pierre charras 39c38fb386 Fix a side effect of our LOCALE_IO by using setlocale( LC_NUMERIC, "C" ) instead of setlocale( LC_ALL, "C" ) LC_NUMERIC is the right option to use in LOCALE_IO because only the floating point separator must be modified When using LC_ALL, the Env var expansion wxGetEnv() was not working when the env var contains non ascii7 codes after a call to LOCALE_IO. When using setlocale( LC_NUMERIC, "C" ) in LOCALE_IO, wxGetEnv() works fine.
Fixes: lp:1795990
https://bugs.launchpad.net/kicad/+bug/1795990
2018-10-07 16:27:47 +02:00
jean-pierre charras 99f25b0895 Opengl fix: bitmaps having a width not multiple of 4 were incorrectly drawn.
This fix draws a "sub bitmap" having a width multiple of 4.
(The loss of 1 to 3 pixels in horizontal size should be not really noticeable)

(cherry picked from commit 3a02e54411)
2018-10-06 07:22:38 -07:00
Tomasz Wlostowski a43ec3e3f0 OPENGL_GAL: optimized JP's bitmap drawing function to use textures
(cherry picked from commit 516cf47946)
2018-10-06 07:22:38 -07:00
jean-pierre charras 7b596f0365 GAL canvases: add DrawBitmap(), using a basic brute force algo for OpenGL, and a optimized code for Cairo. In this fix the brute force means draw each pixel as a rectangle. It works fine, but could be optimized.
(cherry picked from commit fefc7b8172)
2018-10-06 07:22:38 -07:00
Seth Hillbrand dd22c73666 pcbnew: Allow deselection when clicking on zone
Deselection by clicking on a zone makes working with plane zones easier
by allowing the selected item to de-selected by clicking on a zone.
Once the selection is cleared, the zone may be re-selected as normal.
Clicking on non-zone items while a separate item is selected will still
select the new non-zone item without requiring a second click.
2018-10-06 07:22:35 -07:00
Seth Hillbrand d15b34988d pcbnew: Adjust selection behavior in highlight net
Prefer non-zones in highlight net in the same way we do for the
selection tool.  Highlight net just has separate logic and was missed
previously.
2018-10-05 19:58:25 -07:00
Seth Hillbrand 5e0ef36719 pcbnew: Improve zone/polygon selection
Allows selection of polygons and zones by their visible area.  Will only
select polygons/filled areas when they are unobstructed by other
elements in the footprint/pcb.  Also adds a "skip heuristics" modifier
key for clicking (ALT) that allows the full disambiguation list to be
displayed without removing less-likely elements.  This dovetails the
zone/polygon selection as it allows selecting even when areas a fully
overlapped.

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

(cherry picked from commit 6a6d580a1c)
2018-10-03 07:22:16 -07:00
jean-pierre charras 6994291997 Re activate Zone Unfill All command, accidentally removed by a previous commit.
Fixes: lp:1795293
https://bugs.launchpad.net/kicad/+bug/1795293
2018-10-01 09:05:08 +02:00
Seth Hillbrand 9837d1624f pcbnew: Force at least one connectivity thread
We want to keep at most 1 thread per 2 connectivity updates but we need
to force that floor to be at least 1 for when there is only 1
connectivity update.

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

(cherry picked from commit 89a3d2b451)
2018-09-30 12:14:26 -07:00
Jeff Young 13a41f11eb Don't deselected items that have been deleted.
De-referencing freed memory is never a good idea.

Fixes: lp:1795195
* https://bugs.launchpad.net/kicad/+bug/1795195
2018-09-30 15:46:58 +01:00
Seth Hillbrand 59723ce3ab pcbnew: Handle SEGZONE in GAL
SEGZONEs are no longer created by pcbnew but may exist in older boards.
This allows deleting the old fills in a manner similar to the deletion
in Legacy canvas.

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

(cherry picked from commit ef6f7e96f3)
2018-09-29 15:12:24 -07:00
Seth Hillbrand 79d19d9055 pcbnew: Rename PCB_ZONE_T and remove from connectivity
SEGZONE types were confusingly named PCB_ZONE_T.  Zones in pcbnew are
now _only_ PCB_ZONE_AREA_T, so we name segzone types PCB_SEGZONE_T to be
clear.

This also removes processing of the SEGZONEs from connectivity
calculations.

(cherry picked from commit b3a5e08c2f)
2018-09-29 15:12:21 -07:00
Seth Hillbrand 115f318976 pcbnew: Avoid double-separators in context menu
(cherry picked from commit a81e3c2b13)
2018-09-29 15:10:10 -07:00
jean-pierre charras 51a74b53cb Pcbnew: Crash after running external plugin Happens only in Opengl mode. So enforce controls in 3 group function: DrawGroup, ChangeGroupColor, ChangeGroupDepth.
Fixes: lp:1795044
https://bugs.launchpad.net/kicad/+bug/1795044
2018-09-29 14:19:07 +02:00
John Beard f591f8741a Prevent segfault when undoing or resetting non-hotkey rows
This is caused by:

* Not checking the hotkey data is not null when performing a
  hotkey action
* Allowing hotkey actions on non-hotkey rows.

This fixes both of these, and adds an assert to warn if someone
does manage to fire a hotkey action on a non-hotkey row (but it
won't crash).

This is a ported version of commit 704615721 on the master branch.

Fixes: lp:1794756
* https://bugs.launchpad.net/kicad/+bug/1794756
2018-09-28 10:20:53 -04:00
Jeff Young f56ea6bf3c Don't assume GetFlags() != 0 means it's being edited.
It could just mean it's selected, highlighted or brightened.

Fixes: lp:1794624
* https://bugs.launchpad.net/kicad/+bug/1794624
2018-09-27 22:17:32 +01:00