Commit Graph

7790 Commits

Author SHA1 Message Date
Seth Hillbrand 4ec3f18fda Return wxString for gfx importer messages
Returning a reference to a temporary value crashes when the value is
deallocated before use.  Passing a full string fixes the crash and
allows NVRO on the temporary value.
2021-04-04 06:20:14 -07:00
Jon Evans fc8ffd8421 Disable Cairo canvas for Mac
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7052
2021-04-02 18:50:21 -04:00
Marek Roszko 82f2e8c344 More gracefully handle tinyspline not liking a spline definition
Partial fix for #6634

(cherry picked from commit e409b04538)
2021-04-02 09:41:22 -07:00
jean-pierre charras b76c5c9433 Drill map report: use more digits in float values for diameters. 2021-03-29 11:21:24 +02:00
jean-pierre charras 07568f87c3 Step exporter: better values for min distance between 2 points to merge them.
- The default value is 0.01 mm (according to comments and similar to the 3D viewer
 settings that uses 0.02 mm)
- The export dialog  has now 3 values 1 micron, 0.01mm (default) and 0.1 mm

From Master branch, commits a9feb1c and 5db7580
2021-01-03 14:52:42 +01:00
jean-pierre charras a179893d70 specctra_export: fix an issue with custom pads.
From Master, commit 686254.
In some cases a created pad stack name had the same name as an other pad stack
having a slightly different shape, thus creating pads with a incorrect shape on board.

Fixes #6495 for the 5.1.10 branch.
2020-12-29 17:41:36 +01:00
Jan Mrázek 540fb91d34
Backport 93466fa1: Fix crash when adding 3D Models via Python 2020-12-28 23:22:16 +01:00
qu1ck 50fa1937f9 Read fp-info-cache on first start of fp editor
if fp info list is not initialized
2020-12-19 00:48:42 -05:00
jean-pierre charras f599185e2d fp editor: fix incorrect parent for a error message box
From master branch (commit b425889)
2020-12-17 11:25:12 +01:00
Ian McInerney 4100650ce1 Fix some new compiler warnings on GCC 10 2020-12-15 00:24:42 +00:00
jean-pierre charras 276cb7590d Gerber: speed up seriously solder mask creation.
Fixes https://gitlab.com/kicad/code/kicad/issues/6360
2020-12-13 18:53:17 +01:00
Marek Roszko 17c4e21f34 Use a temp file for saving the fp-info-cache for now 2020-12-11 22:36:54 -05:00
Marek Roszko 3613bca5ea Read the fp-info-cache on pcb file load rather than on frame open
Otherwise in standalone mode pcbnew will never load the cache files and also later erase them :/
2020-12-11 22:36:47 -05:00
Marek Roszko eff9c46e59 Replace wxTextFile for writing fp info cache
wxTextFile uses wxFile which uses write syscalls which means its unbuffered.
This makes file IO more expensive against network shares where it will flush far too aggressively.
wxTextFile is fine for reads however.
2020-12-11 22:34:56 -05:00
jean-pierre charras c186a42a54 Replace wxFloatingPointValidator by our UNIT_BINDER in DIALOG_PAD_PROPERTIES.
the change is a try to fix an annoying issue (#6499 similar to #6670) we cannot
reproduce but is probably related to a locale issue.
2020-12-09 19:50:28 +01:00
jean-pierre charras 676d35f559 Replace wxFloatingPointValidator by our UNIT_BINDER in DIALOG_TEXT_PROPERTIES.
wxFloatingPointValidator has some limitations, but mainly the change is a try
to fix an annoying issue (#6670) we cannot reproduce but is probably related
to a locale issue.
2020-12-09 19:45:03 +01:00
Wayne Stambaugh e8bc4632b4 Minor dialog and other layout fixes.
* Fix clipped bitmap buttons.
* Remove colons from the end of wxStaticBoxSizer strings.
* Minor padding improvements.
2020-12-08 09:19:32 -05:00
Mark Roszko dde87b2f45 Prevent dxf imports of text from processing NaN coordinates 2020-12-05 01:55:39 +00:00
jean-pierre charras 789284f519 Pcbnew, modifiers for left click behavior.
Due to last changes fixing the ALT key problems, the highlight net is
CTRL+SHIFT + left click on Windows and Linux
CTRL+ALT + left click on OSX
Fix also a bad behavior of "remove from selection" left click option

Fixes #6599
https://gitlab.com/kicad/code/kicad/issues/6599
2020-12-04 12:05:46 +01:00
Seth Hillbrand 59c5b30f3f CMake adjust Linux build
Instead of linking the same target name and re-building, we can install
the file to a new name.  This speeds the build process and keeps linking
routines from stepping on each other.  Available now that we are at
CMake 3.0.2

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

(cherry picked from commit 51511eda85)

Fixes https://gitlab.com/kicad/code/kicad/issues/6576
2020-12-02 08:28:49 -08:00
jean-pierre charras a33e2ed9b1 gendrill_file_writer_base: better algo to sort holes:
Holes were correctly sorted by size, but inside the same hole size
the holes were strangely sorted.
Now holes are sorted by hole size, and (inside the same size) by position.

From master branch
2020-11-30 20:22:30 +01:00
Wayne Stambaugh 7687ca2080 Pcbnew: change block selection and heuristic context menu modifier keys.
Do not use the alt modifier key to force the display of the heuristic
context menu.  This causes a conflict with menu selection on windows
and immediately dismisses the disambiguation context menu.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1873
2020-11-30 11:47:15 -05:00
jean-pierre charras 2a1a6e8cbe From master branch: Make path substitutions grid read only in lib table dialog
From master branch, commit becc811.
2020-11-29 13:21:15 +01:00
jean-pierre charras 63baa69342 Some fixes from master branch:
- fix environment variable changes after running Pcbnew in some cases.
- kicad manager: correct bitmap icon for gerber job files
- incorrect position of some checkboxes (not readable) when compiled with
wxWidgets 3.1.4
2020-11-21 15:56:54 +01:00
Seth Hillbrand bf97378168 Don't allow selection of PCB_NETINFO_T
This is a version of master commit d9a94dc538
but that cannot be cherry-picked because it contains a number of
unrelated modifications

Fixes https://gitlab.com/kicad/code/kicad/issues/5729
2020-11-03 10:19:04 -08:00
jean-pierre charras 89951b01ff Fix incorrect vertical position of check boxes in some wxGrid on wxWidgets 3.1.4.
Fix also 2 compil warnings.

These fixes come from the master branch
2020-10-04 09:55:09 +02:00
Seth Hillbrand 8234c20e28 Remove threading from Python wrapper
Python threading can cause issues with zone filler, connectivity
calculations and many other parts.  This forces the emitted code to hold
the GIL when running.

Fixes https://gitlab.com/kicad/code/kicad/issues/4436
2020-09-15 17:11:12 -07:00
jean-pierre charras 52e272954f Fix a DRC crash if a zone is flagged as filled but has 0 filled areas
Fixes #5631
https://gitlab.com/kicad/code/kicad/issues/5631
2020-09-15 14:18:23 +02:00
jean-pierre charras 2ab8751fd4 Drill files export: ensure the Top to Bottom PTH drill file is always created,
even if there are no hole. NPTH file is already always created.

From Master.

Fixes #5566
https://gitlab.com/kicad/code/kicad/issues/5566
2020-09-10 17:04:01 +02:00
jean-pierre charras 54589c0828 FOOTPRINT_WIZARD_FRAME::ParametersUpdated(): fix a reentering issue
On wxWidgets 3.0.5, in some cases calling ReCreateParameterList() generates
a EVT_GRID_CMD_CELL_CHANGED that call ParametersUpdated()
and creating an infinite loop
Note also it happens **only for languages using a comma** instead
of a point for floating point separator
It does not happen on wxWidgets 3.1.4

From master branch
2020-09-08 19:02:17 +02:00
Seth Hillbrand 1fdb247167 Reverts premature Python 3 calls in favor of backwards compat.
This reverts commits d8d8f4f670
and 9614f6d0d9.

(cherry picked from commit 91914f1a71)
2020-09-03 20:06:28 -07:00
Ian McInerney f58de79ceb Provide a checkbox to use negative coordinates in the position file
ADDED: A checkbox to allow selection of positive/negative X coordinates
for bottom components.

Fixes https://gitlab.com/kicad/code/kicad/issues/4638
2020-08-29 23:17:29 +01:00
Seth Hillbrand d29edf6381 Removing extra parameters to super() calls
The extra parameters seem to cause problems for some Python
configurations and are not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/4896

(cherry picked from commit d8d8f4f670)
2020-08-12 06:33:22 -07:00
Blake Smith b087b7743e Fix PadGridArray super call
(cherry picked from commit 9614f6d0d9)
2020-08-12 06:33:21 -07:00
Ian McInerney 1088d613d5 Escape all env var strings sent to the Python interpreter
Fixes https://gitlab.com/kicad/code/kicad/issues/5130

(Cherry-picked from 0a0ed9e064)
2020-08-11 00:53:48 +01:00
Seth Hillbrand 0fd1214dea pcbnew: Fix multiple issues with BOARD_CONNECTED_ITEM
Modules are not members of BOARD_CONNECTED_ITEM, so we cannot use this
as a proxy for membership in the connectivity or ratsnest calculations.

Fixes https://gitlab.com/kicad/code/kicad/issues/5140
2020-08-10 12:53:37 -07:00
Ian McInerney 589951eaea Ensure the environment variables are synced between Pcbnew and Python
This ensures that when the project or an environment variable is changed
in pcbnew, the Python interpreter is updated to reflect that.
This is a backport version of the master-branch commit, and will not
synchronize any changes to the environment variables if they are made
from frames other tna Pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 20:32:38 +01:00
Ian McInerney 5c3bcb09fa Give the length tuning tool an inital end point that isn't the start point
Using the starting point as the end point means that the tool
initializes with 0 length traces and so nothing is visible.

Fixes https://gitlab.com/kicad/code/kicad/issues/1912
2020-08-08 22:55:18 +01:00
jean-pierre charras ba5ab99a03 pcbnew: More about Prevent use of non-connected item in ratsnest
Another static cast was left. changed now to dyn_cast

We need to be careful in the connectivity system to always use
dyn_cast/dynamic_cast and check the return when dealing with board
items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5082
2020-08-08 09:59:54 +02:00
Seth Hillbrand 9bc3028eb7 pcbnew: Prevent use of non-connected item in ratsnest
We need to be careful in the connectivity system to always use
dyn_cast/dynamic_cast and check the return when dealing with board
items.  Getting non-connected items will result in null nets when
propagated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5082

(cherry picked from commit 406de56964)
2020-08-07 14:09:03 -07:00
Ian McInerney 78a7dd3269 Properly dismiss the grid combobox editor when it loses focus
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/4617

(Cherry-picked from af24a5d5a7)
2020-08-06 02:02:32 +01:00
jean-pierre charras a370d69542 Gerber plotter: Better object attributes handling when plotting a zone
- Clear object attributes before and after plotting a zone.
 It avoid using previously defined object attributes when plotting the next
 zone, and using therefore incorrect attributes.
- Add aperture attribute to filled zone solid polygons (regions in Gerber)

From master branch
2020-06-28 13:14:06 +02:00
Frank Severinsen 910605cc7d Fix text rotation after flip
fixes https://gitlab.com/kicad/code/kicad/-/issues/4407

(cherry picked from commit 9cf1e61d8a)
2020-06-27 21:49:15 -04:00
Seth Hillbrand 7194e25bba pcbnew: Allow slow ratsnest to turn off
Depending on where you move the selection, the slow ratsnest might turn
on.  This prevents that setting from being sticky, reverting to smooth
movement.

(cherry picked from commit a893d19d26)

Fixes https://gitlab.com/kicad/code/kicad/issues/1909
2020-06-24 17:27:39 -07:00
Seth Hillbrand 7f287cb8f9 Remove delauney computations from dynamic ratsnest
Avoids additional calculations on movement by using cached ratsnest for
internal nets and keeping bicolored line calc for others.

Fixes https://gitlab.com/kicad/code/kicad/issues/1865

cherry-picked from 104ff29e5f
2020-06-22 20:42:12 -07:00
jean-pierre charras a0ce1491d9 Gerber plot solder mask margin: use new algo from master branch to avoid
merging pad shapes when the min width mask is not 0.

Keeping pad shapes clearly identified in Gerber files is mandatory,
so the initial algo that merged shapes in some cases was not good
from this point of view.
2020-06-21 20:47:58 +02:00
jean-pierre charras 26035d23fe Pcbnew, DIALOG_PLOT_BASE: better warning message about non null solder mask margins. 2020-06-21 20:42:37 +02:00
jean-pierre charras b482deb8b0 Fix a incorrect code after a old other code change. 2020-06-18 12:53:06 +02:00
jean-pierre charras abb45fbe45 Gerber plotter: better choice of aperture attributes in internal layers.
From master branch
2020-06-14 18:18:20 +02:00
jean-pierre charras 567ce48cc1 panel lib tables: avoid crash when deleting the last entry in list.
From master branch
2020-06-14 17:51:27 +02:00