Commit Graph

13166 Commits

Author SHA1 Message Date
Wayne Stambaugh 6f65f835f4 Fix assert in CvPcb when opening footprint equate file dialog.
Fixes lp:1774726

https://bugs.launchpad.net/kicad/+bug/1774726
2018-06-04 10:09:06 -04:00
Maciej Suminski e4a6f2e523 Switch canvas to Cairo if OpenGL is not supported on the first run 2018-06-04 12:17:58 +02:00
Maciej Suminski 6bd708621b Early check of supported OpenGL version 2018-06-04 12:17:58 +02:00
jean-pierre charras 0b8cf93888 Pcbnew, On line DRC in legacy canvas: Fix broken Drc test during track and zone creation or edition.
It was broken by commit c78171d01f.
During creation, the Drc must only display a error message, and do not create markers.
Markers are created only during a full board DRC test.
commit c78171d01f replaced this behavior by a incorrect one (create markers and do not show error messages)
2018-06-04 11:20:11 +02:00
Maciej Suminski 27c9c6ceed Enable the accelerated canvas on the first gerbview run if requested
Commit 8910894f applied to gerbview.
2018-06-04 10:47:44 +02:00
Maciej Suminski 8910894fab Enable the accelerated canvas on the first pcbnew run if requested
Fixes: lp:1769143
* https://bugs.launchpad.net/kicad/+bug/1769143
2018-06-04 10:41:34 +02:00
jean-pierre charras d3c41dd247 Remove dead code. 2018-06-03 19:55:03 +02:00
Seth Hillbrand 0a91f0bc9c Add 45º constraints to lines when moving with CTRL
Fixes: lp:1774750
* https://bugs.launchpad.net/kicad/+bug/1774750
2018-06-02 15:52:18 -07:00
Seth Hillbrand 975e777149 Fix threaded race condition in footprints
The progress reporter should not be cleared in the footprint
implementation to prevent dereferencing a NULL.

When cancelling the load, we should only allow setting of cancellation
to true to prevent a condition where the progress reporter resets
the cancellation.

Fixes: lp:1774777
* https://bugs.launchpad.net/kicad/+bug/1774777
2018-06-02 15:05:36 -07:00
jean-pierre charras 6e57266136 Pcbnew: optimize BOARD::SortedNetnamesList() for a must faster calculation time.
It is mainly used in copper zones dialog editor,
and previously created a noticeable delay to show this dialog with large boards (more than 900 nets)
2018-06-02 18:14:34 +02:00
Jean-Samuel Reynaud d4393b2813 Fix incorrect Eeschema BOM plugins install path on Linux.
Fixes lp:1697041

https://bugs.launchpad.net/kicad/+bug/1697041
2018-06-01 14:09:08 -04:00
jean-pierre charras 8f984c2899 OpenGL, DrawGrid(): use grid and axis alpha color value setting, instead of the fixed 1.0
In Cairo mode, this function uses already the alpha color value setting.
Now for low alpha values (usually they are low, as said in many GAL comments),
Cairo mode and OpenGL mode should have a similar look.
2018-06-01 18:29:04 +02:00
Seth Hillbrand 3cf9009f73 Delete GL context in GL destructor not program
Also lock the DeleteAll call with mutext to protect threaded access.

The OpenGL contexts are removed when OPENGL_GAL class is destroyed.
Explicitly deleting all contexts prior to destroying the OPENGL_GAL
class causes an assert when the destructor tries to lock its context
prior to cleaning up OpenGL memory.  In most cases, an unhandled assert
in a destructor-called function will simply exit the destructor.

Python thread cleanup will also attempt to close the context.  This can
cause a race condition with multiple threads accessing/deleting the
canvas.

Fixes: lp:1774096
* https://bugs.launchpad.net/kicad/+bug/1774096
2018-06-01 09:14:36 -07:00
jean-pierre charras bfa89039c4 Gerbview, GAL mode: fix "Zoom to fit" area size calculation when nothing is loaded.
Also ensure the worksheet is displayed after clearing the gerber layers.
2018-06-01 11:39:08 +02:00
jean-pierre charras 9a228d8ec9 Gerbview: GAL mode: shows the page worksheet, similar to legacy mode. 2018-06-01 09:11:43 +02:00
jean-pierre charras fc71fc6474 Gerbview: Fit to page: use the page size when nothing is loaded.
Previously, due to a minor bug, a very small default size was used (therefore a high zoom value), that was not a good choice.
2018-05-31 11:22:33 +02:00
Maciej Suminski 7c49bcd3a6 Clear selection before deleting DRC markers
Pcbnew crashes when a selected DRC marker is deleted. This a possible
fix to lp:#1773863.
2018-05-31 09:32:43 +02:00
Maciej Suminski f51f30fb1e eeschema: Disabled an assert checking if project path is empty
Empty project path is a valid case when eeschema is executed in
standalone mode without any file loaded.

There were no observed harmful consequences of running eeschema without
the project path set, but to stay safe the project specific
sym-lib-table load code is executed only when the project path is set.
2018-05-31 09:09:01 +02:00
Maciej Suminski c5cde53dff Symbol Editor: fixed a crash when modifying a symbol
In the scenario described in the bug report, the SCH_SCREEN current item
pointer stores an address of a stale object that had been deleted when
the symbol was reloaded. To prevent the crash, the current item pointer
is reset whenever a symbol is loaded.

Fixes: lp:1774296
* https://bugs.launchpad.net/kicad/+bug/1774296
2018-05-31 09:01:59 +02:00
Seth Hillbrand 3ce8a4856a Remove ToLayer_ID calls from color checks
Colors are assigned to virtual layers while the ToLayer_ID returns a
physical layer enum.  The GetLayerColor/SetLayerColor take LAYER_NUM
(int) values that can be larger than the physical layer count.
2018-05-30 13:51:20 -07:00
Jeff Young d90d4ff682 Fix bugs in Export to SVG.
We were trying to handle aOnlyOneFile at two different levels
which was preventing the Silk layer from going through the
right routine (and preventing board outlines from getting
drawn if selected).

We were also overwriting the references color local variable
before using it, meaning the reference was always rendered in
the value's color.

Fixes: lp:1774171
* https://bugs.launchpad.net/kicad/+bug/1774171
2018-05-30 20:49:05 +01:00
Seth Hillbrand fe1f837d0c Limit zoom out
We limit the minimum zoom to Z=0.3.  Minimum preset zoom level is 0.31,
so 0.3 is only reachable using the mouse wheel.  Smaller than 0.18, GAL
does not display properly.

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-30 11:24:35 -07:00
Seth Hillbrand eeb273faa0 Partial revert of 3804f6 to correct assert change
ToLayerID function converts to PCB_LAYER_ID and needs to check against
that enum instead of GAL_LAYER_ID.
2018-05-30 09:17:51 -07:00
Baranovskiy Konstantin 36504b3071 SymLibEditor: synced state of search tree tool button with its panel
Button "Toggle the search tree" from left toolbar of Symbol Library
Editor does not show actual state of visibility of the search tree
panel. State of this button (checked or unchecked) changes on clicking
only. Toggling panel visibility from menu does not make effect on tool
state.

Applied changes makes tool state (checkd/unchecked) synced with panel
state (shown/hidden).
2018-05-30 16:55:55 +02:00
Jeff Young d03e92a3a2 Field Name Template (aka Default Fields) fixes.
Move from a "default" fields model to a "seed" fields model.  See
discussion on devlist:
https://lists.launchpad.net/kicad-developers/msg35823.html.
2018-05-30 09:46:52 +01:00
Maciej Suminski 8c63dac0c3 Component Chooser: do not create FP list when the FP preview is disabled 2018-05-30 09:53:58 +02:00
jean-pierre charras 52fceb3243 Eeschema: sheet filename renaming: fix a old issue that can set incorrect filenames in sheets inside a complex hierarchy.
Fixes: lp:1773500
https://bugs.launchpad.net/kicad/+bug/1773500
2018-05-29 19:57:18 +02:00
jean-pierre charras ce9cc4ea38 plot board: fix a stupid bug created by commit dfa91752 2018-05-29 19:51:50 +02:00
Maciej Suminski c5f56ef573 Eagle PCB import: made warning strings translatable 2018-05-29 15:02:26 +02:00
Maciej Suminski d2436e7478 Corrected "Add footprint library" dialog file filters
Fixes: lp:1773969
* https://bugs.launchpad.net/kicad/+bug/1773969
2018-05-29 15:02:26 +02:00
jean-pierre charras dfa9175209 Fix incorrect mask size for rectangular and trapezoid pads.
Fixes: lp:1773926
https://bugs.launchpad.net/kicad/+bug/1773926

Fixes: lp:1773961
https://bugs.launchpad.net/kicad/+bug/1773961
2018-05-29 13:45:45 +02:00
jean-pierre charras 71e64de3a4 gerber plot: fix incorrect string attribute for BGA pads on copper layer 2018-05-29 12:30:52 +02:00
Maciej Suminski 94f161b8c2 Eagle SCH import: validate imported symbol names
Fixes: lp:1753189
* https://bugs.launchpad.net/kicad/+bug/1753189
2018-05-29 09:29:22 +02:00
Maciej Suminski e789523632 Eagle SCH import: do not crash if nothing was imported 2018-05-29 09:29:21 +02:00
Jeff Young a12b9db584 Map Eagle values to fab layers.
Fixes: lp:1773256
* https://bugs.launchpad.net/kicad/+bug/1773256
2018-05-28 20:37:52 +01:00
Jeff Young f914558e7b Remove overly-strict assert.
Fixes: lp:1773807
* https://bugs.launchpad.net/kicad/+bug/1773807
2018-05-28 20:37:14 +01:00
Maciej Suminski a8db21319f Spice Simulator: set correct scale for constant plots
Fixes: lp:1772278
* https://bugs.launchpad.net/kicad/+bug/1772278
2018-05-28 16:42:15 +02:00
Marco Ciampa 2cb65f9c19 Make the Simulator error strings translatable 2018-05-28 14:51:10 +02:00
jean-pierre charras da66005254 Pcbnew, plot dialog: avoid slightly change in hpgl pen diameter (due to inch/mm conversion error) when the hpgl format is not selected 2018-05-26 17:36:07 +02:00
jean-pierre charras 7db88126c5 hpgl plot parameters: use double instead of int to store the pen diameter to avoid truncation.
This parameter, always in mm in a hpgl file, is for historical reasons stored in mils,
and using a int to store it created annoying rounding errors.
2018-05-26 09:37:42 +02:00
Seth Hillbrand da061718e5 Remove constraint on circle
Allows circle radius to snap to arbitrary points while editing

Fixes: lp:1773436
* https://bugs.launchpad.net/kicad/+bug/1773436
2018-05-25 12:30:47 -07:00
jean-pierre charras c614f73c50 HPGL plotter fix incorrect scaling factor
A 0.4% scale error in hpgl plots was previously existing since a long time.

Fixes: lp:1772828
https://bugs.launchpad.net/kicad/+bug/1772828
2018-05-25 20:50:00 +02:00
jean-pierre charras 250d958ebb Plot dialog: fix broken dialog management.
Previously, the dialog was created only once, with the current board setup and the current units selection.
Therefore, after changes in board or units, the dialog was really broken.

Now, the dialog is recreated when the plot command is run.
2018-05-25 19:48:07 +02:00
Jeff Young cd5f727880 Fix off-by-1 errors in zoom menus & use zoom steps in GAL canvas.
Also bumps the maximums a bit (at user request).

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-25 13:01:58 +01:00
Jeff Young b89f6d4af3 Decrease allowed coverage ration when zones are involved.
A perfect solution would create holes in the coverage map
for the zone edges and handles, but that's a lot more
work.

Fixes: lp:1773204
* https://bugs.launchpad.net/kicad/+bug/1773204
2018-05-25 13:01:58 +01:00
Maciej Suminski 61597db12d Make the Simulator dialog strings translatable 2018-05-25 11:24:25 +02:00
Maciej Suminski 32f599654f Fixed normalizeAbsolutePaths() condition
normalizeAbsolutePath() used an invalid condition to
verify that the tested paths are on the same volume.
2018-05-25 11:07:51 +02:00
Maciej Suminski 145835661b Replaced footprint library wizard with a common file browser
As of v5 footprint library reorganization (one repo per library concept
is replaced with a common repo for all libraries), the Footprint Library
Wizard may handle only the old libraries. It has been replaced with
a file browser to select only local files.

Fixes: lp:1772209
* https://bugs.launchpad.net/kicad/+bug/1772209
2018-05-25 08:51:46 +02:00
Maciej Suminski adc61024d3 DIALOG_FILE_DIR_PICKER: dialog to select both files and directories
wxWidgets offers two dialog types: wxFileDialog and wxDirDialog, one
to select files, the other to select directories, but neither of them
handles both. DIALOG_FILE_DIR_PICKER fills that gap.
2018-05-25 08:51:45 +02:00
Jeff Young 81af2db614 Even out the Gerbveiw zoom steps and increase the max.
Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-24 19:04:10 +01:00