Commit Graph

13166 Commits

Author SHA1 Message Date
Jeff Young cb925a6646 Output defined default fields to netlists & BOMs.
Fixes: lp:1746814
* https://bugs.launchpad.net/kicad/+bug/1746814
2018-05-24 18:24:59 +01:00
jean-pierre charras 6090f9001e netinfo.i: fix incorrect position of a declaration, that was not taken in account.
Fixes: lp:1544750
https://bugs.launchpad.net/kicad/+bug/1544750
2018-05-24 09:43:04 +02:00
Jeff Young 8f5cb32598 Don't write empty fields from Global Edit Fields dialog. 2018-05-23 21:35:23 +01:00
Seth Hillbrand cf2a07559d Safely release thread memory
When starting async processes, we need to have a way to stop the process
before releasing memory.  Descoping FOOTPRINT_ASYNC_LOADER while the
threads were still running could cause crashes depending on the memory
structure.  To avoid this we define clear procedures for exiting a
running async processes and call these when exiting.

Fixes: lp:1772909
* https://bugs.launchpad.net/kicad/+bug/1772909
2018-05-23 08:55:55 -07:00
Maciej Suminski 190d4d6f55 Eagle PCB import: disable copper pour for imported *Restrict layer polygons
Fixes: lp:1772245
* https://bugs.launchpad.net/kicad/+bug/1772245
2018-05-23 17:51:49 +02:00
jean-pierre charras 3893c43eb0 Fix compil issues. 2018-05-23 11:31:13 +02:00
jean-pierre charras ca548809da Fix a qa test issue related to pad hit test. 2018-05-23 09:17:35 +02:00
Seth Hillbrand 8506cdf3ae Avoid numerical dereference of selections
The SELECTION is a std::set.  Numerical dereference of item n is O(n) as
the iterator is not random access.  Therefore, a for loop using
numerical dereference is O(n!) and quickly slows.

We avoid this by storing items to remove separately while iterating and
then removing the items after we complete.

Fixes: lp:1692081
* https://bugs.launchpad.net/kicad/+bug/1692081
2018-05-22 16:37:45 -07:00
Seth Hillbrand 8d52dc9451 Avoid re-checking items already selected
If you select a track with many segments (e.g. a length-tuned track) and
then select all connected items again ('U' -> 'U'), we would iterate
over all items in the selection and mark connections for each of the n
segments n separate times.

We avoid this by using the marked flag to show when the segment has
already been visited by the routine.  This means that if the segment has
been checked for connections because it was connected to the previous
item, it won't be checked for connections again.  However, a selection
that interleaves items from multiple connection segments will still
(potentially) be multiply checked as the BUSY flag is cleared each time
there is one not-BUSY track in the selection.
2018-05-22 16:26:52 -07:00
Seth Hillbrand b625d29151 Only search pads when the position hits module
On large boards with high pad-count modules, searching each pad for hits
becomes expensive.  We eliminate many of the pad searches by first
checking the module's bounding box before iterating over pads to look
for hits.
2018-05-22 15:37:24 -07:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Seth Hillbrand b8f960ea09 Correct message panel sizing
Message panel in update PCB needs size hints from the dialog to
correctly choose the size.
2018-05-22 13:54:48 -07:00
Jeff Young c4b447f3f9 Initialize field visibility checkboxes in Fields Editor. 2018-05-22 19:24:37 +01:00
jean-pierre charras 6f249e5eb6 Add missing icons in lock/unlock context submenu 2018-05-22 14:36:35 +02:00
Jeff Young e3c4a96f5c Default field bug fixes.
1) Commit in-progress edits before closing preferences.
2) Handle default fields in Symbol Fields Editor.
3) Save state of checkboxes in Symbol Fields Editor.
2018-05-22 12:55:39 +01:00
Seth Hillbrand 2d812c2827 Remove FreeRouting icon and menu option
Freerouting-specialized menus are removed as FreeRouting is not
maintained or packaged for most OSes.  Users can still import/export
SPECCTRA files in KiCad allowing them to interface with a custom
FreeRouting installation.
2018-05-21 10:44:32 -07:00
Seth Hillbrand 5d8dd38664 Standardize graphical edit window
The graphical editor window for pcbnew and modedit have slight
differences, so different classes.  But they should appear the same to
the user.  This merges the differences into a dialog that looks the same
to the user.

Fixes: lp:1772389
* https://bugs.launchpad.net/kicad/+bug/1772389
2018-05-21 09:37:04 -07:00
Jeff Young 6a2dc8d4eb Roll back last 2 commits meant for the other resolver only.
Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-21 16:25:44 +01:00
Jeff Young cdde4c4b40 Fix a bug in how we check for differential pair tuning.
Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-21 13:49:40 +01:00
Jeff Young 0fd0e84162 Keep OK/Cancel buttons at bottom of Track/Via Properties.
Fixes: lp:1772260
* https://bugs.launchpad.net/kicad/+bug/1772260
2018-05-21 13:18:41 +01:00
Jeff Young 2b22cbe94d Release mouse before closing HTML_MESSAGE_BOX.
Fixes: lp:1772275
* https://bugs.launchpad.net/kicad/+bug/1772275
2018-05-21 13:18:41 +01:00
Jeff Young 10ec39a107 Move 3D file error messages to tracePathsAndFiles key.
Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-21 13:18:41 +01:00
Wayne Stambaugh c49a4398a1 Set KiCad version to 5.0.0-rc2-unknown for next development cycle. 2018-05-20 21:24:18 -04:00
Wayne Stambaugh b4f9b5359d Set KiCad version to 5.0.0-rc2. 2018-05-20 21:20:28 -04:00
Seth Hillbrand 0c2f9b1827 Keep circles controlled by radius
Circles are defined by center and a point on their edge.  This requires
the user to do extra math to figure out the size of the circle.  The
patch allows the user to edit and draw circles using radial coordinates.
2018-05-20 17:16:44 -07:00
Jeff Young 3a8a718e43 A pesky bug, this one is. (Said in best Yoda impression.)
There were two examples of the somewhat annoying error message.
This gets the second one.

Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-21 00:19:55 +01:00
Wayne Stambaugh 5678a166ee Fix template path bugs.
Remove KICAD_PTEMPLATE environment variable as it's purpose was not
clear and was often poorly defined as the path to the KiCad installed
templates.

Add a new KICAD_TEMPLATE_DIR environment variable which clearly should
be the path of the KiCad installed templates.  Make this environment
variable available in the user settings in case the default is wrong
which has been the case in some instances.  Use the standard search
stack to set the default system template path which has a much greater
chance of being correct.

Add a new KICAD_USER_TEMPLATE_DIR environment variable which clearly
should be the path of the user defined templates.  Users most likely
were not even aware of the old default user path unless they read the
fine manual.

Set template path search stack priority as follows:

* KICAD_USER_TEMPLATE_DIR
* KICAD_TEMPLATE_DIR
* Search stack template paths

Reverse template selection dialog and project path dialog for improved
user experience.

Fixes lp:1543443

https://bugs.launchpad.net/kicad/+bug/1543443
2018-05-20 18:56:11 -04:00
Jeff Young 8badfea17a Fix the build messages fall-behind problem...
... by getting rid of the separate window.  It makes more sense
to put the messages into the wizard anyway.

Fixes: lp:1492836
* https://bugs.launchpad.net/kicad/+bug/1492836
2018-05-20 23:48:29 +01:00
Jeff Young e27d31d51d Fix minor dialog layout issue. 2018-05-20 23:48:29 +01:00
Jeff Young c48e5b6423 Remove unhelpful warning message.
It appears far too often with the new libraries.

Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-20 23:48:29 +01:00
Jeff Young 052ca08546 Switch footprint-locked-can't-remove msg to warning.
Fixes: lp:1689898
* https://bugs.launchpad.net/kicad/+bug/1689898
2018-05-20 23:48:29 +01:00
Jeff Young 62a5ee8c21 Layout Track / Via Properties dialog.
It's sizing is dependent on the selection.

Fixes: lp:1772260
* https://bugs.launchpad.net/kicad/+bug/1772260
2018-05-20 23:48:29 +01:00
Jeff Young 63c9e11aae Bug fixes in Length Tuning UI.
1) hide the status popup when the dialog is brought up
2) forward events from the popup to the canvas so hotkeys work
3) make sure diff pair radius is always 100%
4) fix greyed-out Miter style label
5) make L a hotkey so it works before you start dragging

Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-20 23:48:29 +01:00
Maciej Suminski 8f6ae70400 Deterministic algorithm for picking field values in multiunit components
The original algorithm picked the value from the last component having
non empty value for a given field, but the processing order was
dependent on the layout of the components in the memory. It means that
for each component, the field values could have been taken from any
unit, randomly.

The patch improves the algorithm, trying to get all values from the unit
with the lowest number and resorts to other units only when there are
field values left empty.
2018-05-19 18:43:23 +02:00
Maciej Suminski dcf60f8e6f Eagle PCB import: handle keepout zones
Fixes: lp:1755886
* https://bugs.launchpad.net/kicad/+bug/1755886
2018-05-19 18:43:04 +02:00
Jeff Young 2bd0a027a2 Improved error messages for diff-pair routing.
Fixes: lp:1542592
* https://bugs.launchpad.net/kicad/+bug/1542592
2018-05-19 01:52:22 +01:00
Seth Hillbrand 6b1df2e992 Remove extraneous PROFILE
Accidentally committed in b2d063137
2018-05-18 17:08:52 -07:00
Seth Hillbrand 0c1172b17d Garbage collection optimization
We only need to iterate over the anchors when there are items that are
marked invalid.  We check once in the item list and only if there are
invalid items to remove do we trim the anchor lists.

However, the connected items might still need to be trimmed, so we leave
this final step outside of the conditional.
2018-05-18 16:59:36 -07:00
Seth Hillbrand b2d0631370 Split anchor vectors by layer
This is a speed commit for large boards.  Tracks and pads cannot connect
to elements that are not on the same layer.  Rather than checking for
this at the last step, this commit splits the anchor vectors by layer,
limiting the initial search space.
2018-05-18 16:59:36 -07:00
Seth Hillbrand 019ada0a92 Move some connectivity search to std::algs
Previously, binary search was hand-coded.  This moves the search to a
std::algorithm variant.  Also searches bbox by limits rather than
directly iterating.
2018-05-18 16:59:36 -07:00
Jeff Young 0bcfb2c7df Don't write library name to footprint files.
Fixes: lp:1772095
* https://bugs.launchpad.net/kicad/+bug/1772095
2018-05-19 00:57:15 +01:00
Jeff Young c5696738d2 Use diff-pair-via clearance when checking against vias.
Fixes: lp:1742275
* https://bugs.launchpad.net/kicad/+bug/1742275
2018-05-18 23:42:38 +01:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

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

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
Seth Hillbrand d22fceca7c Revert hotkey save format
This reverts the hotkeys file format to a human readable and VCS
compatible listing by splitting individual hotkey assignments onto
separate lines instead of the single key. This unifies the hotkey format
between the application configuration and export Hotkey routines.

Both hotkey formats remain readable by the same routines.
2018-05-18 12:53:45 -07:00
jean-pierre charras bbc01e0c2b Add a tooltip in DIALOG_POSITION_RELATIVE. 2018-05-18 20:42:24 +02:00
Jeff Young 149f4f68c9 Leave decorations on LAYER_GP_OVERLAY.
In particular, don't reset them to 0, which happens to be F_Cu.

Fixes: lp:1658775
* https://bugs.launchpad.net/kicad/+bug/1658775
2018-05-18 18:18:40 +01:00
jean-pierre charras 45dad4ded5 DIALOG_POSITION_RELATIVE: make dialog more understandable.
Better texts, and add a helper comment.
2018-05-18 13:53:31 +02:00
Jeff Young 5010a461e1 Make polar coordinates consistent.
Use theta instead of phi (which normally describes the azimuth
angle).

Fixes: lp:1545107
* https://bugs.launchpad.net/kicad/+bug/1545107
2018-05-18 12:22:14 +01:00
jean-pierre charras 2363f36033 Fix compil issue in dialog_select_net_from_list.cpp with wxWidgets 3.1 2018-05-18 10:16:30 +02:00
jean-pierre charras ec98bbba11 Fix issue: HPGL (plot mode sketch) : polygons are not closed.
Fixes: lp:1771531
https://bugs.launchpad.net/kicad/+bug/1771531
2018-05-18 10:13:46 +02:00