Commit Graph

9361 Commits

Author SHA1 Message Date
Jeff Young f2d91862c7 Allow reading filled rectangles and circles from pcbnew files.
The internals have supported them for some time now.
2020-08-09 15:39:51 +01:00
Mark Roszko c6e388db14 Implement an app progress indicator in the taskbar
ADDED: Progress indicator in the taskbar

This adds a progress indicator to the Windows and macOS taskbar
icons to display the progress of some operations.

Note, this requires wxWidgets 3.1+
2020-08-09 10:55:00 +00:00
Jeff Young 5c3fddffa6 Handle module keepout zones on internal layers.
Make sure the Keepout Zone dialog allows specifiying them and make
sure they're selectable.

Fixes https://gitlab.com/kicad/code/kicad/issues/5113
2020-08-09 00:24:53 +01:00
Ian McInerney 90a17427ee 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 23:41:48 +01:00
Jeff Young 492f7859e7 Make sure design settings get written back to board.
Fixes https://gitlab.com/kicad/code/kicad/issues/5109
2020-08-08 23:35:59 +01:00
Jeff Young 6b7503be8e ADDED properties passed between eescema and pcbnew.
And referencable from textVars.

Fixes https://gitlab.com/kicad/code/kicad/issues/5079
2020-08-08 22:49:04 +01:00
Jon Evans 32a7d00256 Make sure projects are cleaned up nicely when frames close
PROJECT objects will be deleted by SETTINGS_MANAGER::UnloadProject
so we need to make sure that this is called at an early enough point
in the closing process that anything needed by the PROJECT dtor
is still around.

Also fix an issue where the schematic worksheet was depending on
the project existing after the schematic had been reset.
2020-08-08 16:52:57 -04:00
Jeff Young ae404e6339 Update board markers from DRC changes before dialog is closed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5110
2020-08-08 19:09:22 +01:00
Jeff Young 484643c5ed Fix really bad bug where KIIDs always get reset when reading files.
Mea culpa.

Fixes https://gitlab.com/kicad/code/kicad/issues/5106
2020-08-08 16:25:30 +01:00
Jeff Young 02bf5d27df Fix crash when a DRC rule specifies an empty zone as a keepout. 2020-08-08 16:25:30 +01:00
Jeff Young 7cd8f710b6 Clean up unused includes. 2020-08-08 16:25:30 +01:00
PJM 829316fad4 Pcbnew #4904 : Import settings from another board deleted internal layers
When importing settings from a board with more copper layers and applying it
to a board with less copper layers, if the user has ticked the checkbox
"Layer settings", then KiCad will delete the inner copper layers.  Only
when the user clicks OK does it then warn that it found deleted items on inner
layers.  The message is too generic and comes after the layers have already
been deleted.

This Merge Request tries to address this by warning them early.  The changes are:

1 - Added code to check if user is trying to import settings from a
board with less copper layers than the current loaded board.  This
results in KiCad deleting inner copper layers.  Now it presents a
warning dialog that explains the current settings will result in deleted
inner layers, and lets the user stop the import process before making any changes.

2 - Made "Import Settings" dialog disable "Import Settings" button
until at least one import option checkbox is checked.

3 - Made "Select All" button on "Import Settings" dialog toggle
between "Select All" and "Deselect All" on each click.

Items 2&3 were added to improve the overall import settings usability
experience.

Fixes issue https://gitlab.com/kicad/code/kicad/-/issues/4904
2020-08-08 00:51:23 +00:00
Seth Hillbrand f615b026d9 pcbnew: Account for zone expansion in conn
Connecting zone-to-zone, we need to allow for the stroke-width in
old-style polygons.

Also, speed up the calculation by skipping zone points that do not fall
inside the matching BBox

Fixes https://gitlab.com/kicad/code/kicad/issues/5043
2020-08-07 15:59:39 -07:00
Jon Evans dcc484e114 CHANGED: Library editors are now usable with no project loaded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3688
2020-08-07 18:02:34 -04:00
Jeff Young db501c2002 Fix issue with doing DRC on a multi-layer zone.
Testing for an intersection of layers between the zone and the
item (track in this case) isn't enough: we need to test for the
presence of the item on each layer of the zone.

Fixes https://gitlab.com/kicad/code/kicad/issues/5102
2020-08-07 22:40:18 +01:00
Jeff Young 1671c3356d Fix typo where "continue" got put on wrong side of closing brace.
Fixes https://gitlab.com/kicad/code/kicad/issues/5100
2020-08-07 22:40:18 +01:00
Jeff Young e5b50d90a7 Update DRC rules to new layer and disallow grammars.
Also adds support for hooking rules up to named zones.

Fixes https://gitlab.com/kicad/code/kicad/issues/2041
2020-08-07 21:49:36 +01:00
Seth Hillbrand 406de56964 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
2020-08-07 13:38:51 -07:00
Jeff Young e14bbc7d83 Fix auto-added include. 2020-08-07 17:10:12 +01:00
Jeff Young 00e77d1ba4 Implement pad & via aprons for hatched zones.
Fixes https://gitlab.com/kicad/code/kicad/issues/2519
2020-08-07 15:15:43 +01:00
Jon Evans 1a3b7828f8 Fix layer exclusions and worksheet in board color theme editor 2020-08-06 17:44:16 -04:00
Jeff Young ea1be41ff0 Only clean up tracks completely inside pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/5093
2020-08-06 21:53:28 +01:00
Jeff Young 76bd344730 Preview for PCBNew colour settings editor. 2020-08-06 19:38:06 +01:00
Jeff Young f27661fa39 Be more flexible with user input; more multibyte safety. 2020-08-06 19:38:06 +01:00
jean-pierre charras 5a33772f41 Pcbnew: avoid crash when saving a board having "orphan" nets.
Sometimes tracks or zones can have "orphan" nets no longer existing
in schematic after updating the board from the schematic (no pad belonging this net).

The fix does not save these broken nets having no info (no netname, no valid netcode)

Fixes #5087
https://gitlab.com/kicad/code/kicad/issues/5087
2020-08-06 16:11:55 +02:00
Seth Hillbrand c57c168753 PNS: Remove items from all layers
subIndices control which layers the items are inserted onto and removed
from.  The iterator to remove items needs to be inclusive of the
first/last layers

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5034
2020-08-05 19:39:55 -07:00
Jeff Young 4b51184678 Don't try and select if we don't have a location.
Fixes https://gitlab.com/kicad/code/kicad/issues/5088
2020-08-06 01:22:59 +01:00
Jeff Young 6a4f611e61 Special handling for connecting vias in hatched zones.
Fixes https://gitlab.com/kicad/code/kicad/issues/2568
2020-08-06 00:03:00 +01:00
Seth Hillbrand 4a79d1be56 Track cleaner should not remove vias from pads
Vias are stored in the board tracks list, so we need to skip them when
testing if the start/end points are both in pads

Fixes https://gitlab.com/kicad/code/kicad/issues/5086
2020-08-05 13:24:14 -07:00
Seth Hillbrand 8a0be64ad4 Ensure dangling test takes track width into account
When running a hit test to check if the anchors are connected, we should
loosen the check for tracks to account for the width.  Otherwise
connected anchors can be connected in the system but test positive for
IsDangling()

Fixes https://gitlab.com/kicad/code/kicad/issues/5027
2020-08-05 13:17:29 -07:00
Jeff Young b26ced820c Make sure plugins table has columns wide enough for headers.
Don't expect wxWidgets to return appropriate values for this.  At
least not in the version we're using.

Fixes https://gitlab.com/kicad/code/kicad/issues/1916
2020-08-05 19:37:52 +01:00
Jeff Young 73832a9708 Work around an event processing failure.
Fixes https://gitlab.com/kicad/code/kicad/issues/4273
2020-08-05 19:36:58 +01:00
Jeff Young 04e57a31eb Reset KIIDs when appending a board.
Fixes https://gitlab.com/kicad/code/kicad/issues/5081
2020-08-05 19:02:19 +01:00
Jeff Young c30739dff3 Implement a more aggressive zone-fill-cancel.
We now unfill all zones so that the user can clearly see that
things are not in a "finished" state.

Fixes https://gitlab.com/kicad/code/kicad/issues/5035
2020-08-05 16:51:58 +01:00
Jeff Young e2ec9d9f00 A more fail-safe way to disallow editing while routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/4413

Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-05 16:51:58 +01:00
Jeff Young a6cdb6440a Give the user a bit of help with board thickness.
Fixes https://gitlab.com/kicad/code/kicad/issues/3807
2020-08-05 16:51:58 +01:00
Jeff Young 9fda8d58d0 Take user to Stackup Page when layers don't match.
Fixes https://gitlab.com/kicad/code/kicad/issues/3807
2020-08-05 00:41:29 +01:00
Jeff Young 5d6c65509a Adjust spacing in pcbnew edit options. 2020-08-05 00:20:37 +01:00
Jeff Young 0e9714fdba Simplify fp-info-cache escaping mechanism.
Fixes https://gitlab.com/kicad/code/kicad/issues/4969
2020-08-04 23:54:12 +01:00
Jeff Young 9cc6a77cc0 Fix bug where preview wasn't getting re-added after view cleared. 2020-08-04 20:40:40 +01:00
Jeff Young 3cf5db3ce5 Allow cancelling of zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/5035
2020-08-04 19:53:35 +01:00
Jeff Young 77fd384da5 Don't allow 45deg rotation to bloat pad numbers/netnames.
Fixes https://gitlab.com/kicad/code/kicad/issues/5064
2020-08-04 17:54:05 +01:00
Jeff Young a5f5a20722 Repair formatting. 2020-08-04 15:57:57 +01:00
Jan Mrázek 1c9cae0b06
eagle: Interpret overline in texts
CHANGED: Overline in Eagle boards are correctly imported
2020-08-04 16:25:08 +02:00
Jeff Young aa8fb38445 Bring panel_pcbnew_color_settings in line with eeschema equivalent.
Also fixes a bug where color changes weren't getting saved because
the set of valid layers didn't include the copper layers.
2020-08-04 15:08:20 +01:00
Jeff Young 59ba793096 Disable various combinations of router and editing commands.
They just confuse each other.

Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-04 14:32:02 +01:00
Jeff Young 0f3d79245e Tidy up delete-all-markers.
Fix a typo in the order of booleans, and move from 3 buttons to
2 buttons and a (remembered-for-session) checkbox.
2020-08-04 13:28:16 +01:00
Jeff Young f67ba62c11 Don't stop when current item is reached: there might be more.
In particular, the two sub-items also count as "current" and need
to be deleted.

Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 13:28:16 +01:00
Jeff Young 9c9fdb2569 More performant (and more correct) deletion of DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 11:45:07 +01:00
Jeff Young 74b9cce682 Try again at dragging module edges.
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-03 23:53:45 +01:00
Ian McInerney acc3217a95 Renormalize line endings and enforce normalization for all contributors 2020-08-03 23:15:10 +01:00
Jeff Young c56599ab07 Allow ERC/DRC markers to be deleted without deleting exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/4953
2020-08-02 22:45:48 +01:00
jean-pierre charras df4226f896 Settings management: try to fix full filename issues when using non ASCII7 chars.
The fix convert all std::string storing a path to wxString (unicode support)
wxString were already used at many place to store paths, but not all.
For internal calculations mixing char strings and wide char strings is a recipe
for bug: any missing conversion between UTF8 and wxString breaks paths.
2020-08-02 21:31:03 +02:00
Jeff Young 7108a25278 Fix issues flipping text.
This is a really hard problem to get right.  This algorithm won't
look quite right if you assemble a paragraph from disjoint text
objects and flip them all top-to-bottom (as it will re-order the
text).  But this is really the nature of the problem (and has to
stay that way to correctly flip disjoint graphic items or mixed
text and graphic items).  The real fix here is to support text
wrapped in a single text box.

Fixes https://gitlab.com/kicad/code/kicad/issues/4480
2020-08-02 17:05:13 +01:00
Jeff Young 6d319e5bf7 Both pads must have nets to be shorting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5047
2020-08-02 17:05:13 +01:00
Jeff Young ef2388b5bb Fix issue with dragging flipped MODULE. 2020-08-02 17:05:13 +01:00
Jeff Young 2320a67c30 Fix issues with DRAWSEGMENT undo. 2020-08-02 17:05:13 +01:00
Jon Evans aae40148dc Switch to ordered_json and enable ignore_comments parser option 2020-08-02 13:11:16 +00:00
Jeff Young dae40d5c9f Don't use std::set_difference which assumes sorted lists.
Fixes https://gitlab.com/kicad/code/kicad/issues/4968
2020-08-01 22:15:53 +01:00
Jeff Young 07085345e9 Flip chamfer corners.
Fixes https://gitlab.com/kicad/code/kicad/issues/5038
2020-08-01 21:32:45 +01:00
Jeff Young 8c16c60e42 Fix typo keeping aperture pads from working.
Fixes https://gitlab.com/kicad/code/kicad/issues/5036
2020-08-01 15:40:34 +01:00
Jeff Young d586495c0a Preview fp edges & text while dragging in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-01 15:40:34 +01:00
Jeff Young 93e3268030 OnPixelInUI is meant to be a scaling factor, not a vector.
Fixes https://gitlab.com/kicad/code/kicad/issues/4669
2020-08-01 00:24:26 +01:00
Qbort 9977299340 Fix compile errors in drc_engine.cpp and panel_setup_rules.cpp 2020-07-31 21:47:01 +00:00
Jeff Young 5c479e150d Tooltip and better icon for compile/check syntax button. 2020-07-31 22:29:05 +01:00
Jeff Young ba537209ab Make sure pasted items get their netclass updated along with their net.
Fixes https://gitlab.com/kicad/code/kicad/issues/4974
2020-07-31 16:47:36 +01:00
Jeff Young 1be39195ab Remove UUIDs from the GUI.
Fixes https://gitlab.com/kicad/code/kicad/issues/5018
2020-07-31 16:06:54 +01:00
jean-pierre charras 4cf5662ea1 Fix incorrect shape of trapezoidal pad shapes. They were not the same as stable branch. 2020-07-31 14:37:21 +02:00
jean-pierre charras 87ebd34ea2 Optimize drawings for degenerated oval pads (in fact circle) and for round pad holes 2020-07-31 10:54:53 +02:00
Seth Hillbrand d7a1a4f822 Try harder to merge colinear tracks
Each time we iterator through the tracks list to merge, we change the
connectivity system and can leave possible merges.  By iterating, we
keep merging until we cannot anymore.

Fixes https://gitlab.com/kicad/code/kicad/issues/5020
2020-07-30 23:04:38 -07:00
Seth Hillbrand 51d7fea934 Separate Cleanup Via from Cleanup Track
There are cases where you will want to keep vias that only connect to
one layer but still want to cleanup tracks.  As distinct entities, they
are given their own checkboxes and actions

Fixes https://gitlab.com/kicad/code/kicad/issues/5019
2020-07-30 21:22:33 -07:00
Ian McInerney 268dec5c19 Cleanup some build and Coverity warnings 2020-07-31 02:46:05 +01:00
Jeff Young fdb23d1a2d Add DRC check for items (pads for now) shorting two nets.
Fixes https://gitlab.com/kicad/code/kicad/issues/4955
2020-07-30 21:42:23 +01:00
Jeff Young e88dda2c01 Handle wildcards and "other" item for insideCourtyard DRC function.
Fixes https://gitlab.com/kicad/code/kicad/issues/4519
2020-07-30 18:07:22 +01:00
Jeff Young b2dc592bf1 Clear UUID and path when pasting board items.
Fixes https://gitlab.com/kicad/code/kicad/issues/4992

Fixes https://gitlab.com/kicad/code/kicad/issues/4041
2020-07-30 18:06:42 +01:00
Jeff Young 577c1be391 Report all DRC rule errors, not just the first. 2020-07-30 14:27:42 +01:00
Jeff Young 5a1b1c544a Add layer to rule grammar. 2020-07-30 14:27:42 +01:00
Jeff Young dda381befb Add insideCourtyard DRC rule function.
Fixes https://gitlab.com/kicad/code/kicad/issues/4519
2020-07-30 14:27:42 +01:00
jean-pierre charras 0c774aa163 Pcbnew: fix a python interface issue ( a not defined constant in some modules).
Was due to incorrect order of definitions in board.i interface.
2020-07-30 10:42:23 +02:00
Michael Kavanagh b3f638caaf Pcbnew plugin: 3d models stop writing 'at' keyword
Previously it wrote 'at' if all values were zero to avoid file changes.
Now write 'offset' in mm in all cases. Still read 'at' values in inches.

Fixes https://gitlab.com/kicad/code/kicad/issues/4316
2020-07-30 02:29:44 +00:00
Seth Hillbrand 0a4ce183a4 ADDED: polygon newlines every point
By default KiCad will now print each polygon point on its own line.
This adds to the vertical distance for large polygons but makes revision
control much cleaner as single point addition to a polygon does not
propagate to a diff over the full polygon.

Users/developers who want to save the files using the 4-points per line
have the ADVANCED_CONFIG setting 'CompactSave' which will provide the
original save method
2020-07-30 01:18:44 +00:00
Tomasz Wlostowski b0874c7b4e pcbnew: forgot about GetEffectiveShape() declaration during rebase 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski 216e587965 BOARD_CONNECTED_ITEM: added NetName property 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski b982ef6a48 PCB_EXPR_EVALUATOR: add destructor 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski 89a953e039 Migrated GetEffectiveShape(s) to SHAPE_COMPOUND 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 85aecc15ee router: fix mistake in 45/free-angle mode selection when dragging corners 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski c2b9db293f router: prevent heap crash when initial walkaround line is empty 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 832a8c5bf7 pcbnew: implement SHAPE_COMPOUND-based GetEffectiveShape() 2020-07-29 23:14:03 +02:00
Seth Hillbrand 1f5fb979b9 Keep PNS item RTree on layer-by-layer
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis.  This also allows for layer expansion by using
deque of RTrees rather than fixed index

This fixes the missing layernumbers and keeps the layers in a deque to
prevent re-allocation on expansion.

Replaces ad94b6205
2020-07-29 11:21:00 -07:00
jean-pierre charras f00c59c446 Fix a few Coverity warnings. 2020-07-29 09:26:57 +02:00
Seth Hillbrand ad94b6205a Revert "Keep PNS item RTree on layer-by-layer"
This reverts commit a34d33c460.

The commit did not work properly for shove routing.  Will revist in
later commit
2020-07-28 21:20:19 -07:00
Jeff Young 0fecb5f277 Be more explicit about string/character conversions.
This *may* fix the bug where a layer name isn't displayed correctly
in the error dialog.  But probably not.
2020-07-28 20:44:40 +01:00
Marek Roszko 9278660b10 Add support for the windows application restart api 2020-07-28 14:32:39 -04:00
Seth Hillbrand a34d33c460 Keep PNS item RTree on layer-by-layer
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis.  This also allows for layer expansion by using
vector of RTrees rather than fixed index
2020-07-28 10:17:56 -07:00
Seth Hillbrand a5a56c46c3 Remove INTRUSIVE_LIST from CN_ITEM
Intrusive lists made the connectivity search not thread-safe.  Using
iterators for item deletion provides the same order performance while
keeping the container thread-localized
2020-07-28 09:29:32 -07:00
Jeff Young 46602148dc Fix overly aggressive assert. 2020-07-28 13:35:37 +01:00
Jeff Young be957e0105 Convert parent-less module items to board items on paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/4938
2020-07-27 19:53:42 +01:00
Jeff Young 1d8c71c617 Fix layout issues in net inspector dialog.
1) don't add 10 -and- include 'M's in the strings; they're both for
   margins
2) take scroll bar width into account when sizing columns
3) make sure margins are added to temp variables that we're going to
   use to size column 1

Fixes https://gitlab.com/kicad/code/kicad/issues/4981
2020-07-27 19:53:42 +01:00
Seth Hillbrand 6900f04ee0 Change Zone extra clearance magic number to AC
Rather than keeping a magic number in the code, we set the default in
the advanced config setting and allow users/developers to modify it.
2020-07-26 07:20:24 -07:00
jean-pierre charras 124afa5fc4 FOOTPRINT_PREVIEW_PANEL: Ensure we are never using the high contrast mode
to display the selected footprint

Fixes #4980
https://gitlab.com/kicad/code/kicad/issues/4980
2020-07-26 13:22:21 +02:00
Simon Richter 95c2b261e8 Don't mandate ownership semantics in API
This API doesn't transfer ownership, so no smart pointers are required --
this just needlessly tightens requirements on the user of the interface.

(Fixes five instances of MSVC C26410 warning)
2020-07-26 02:45:27 +00:00
Simon Richter fdaaa0a704 Make PCB_EXPR_UCODE final
This avoids a warning about its non-virtual destructor during deletion, as
polymorphic classes are expected to be deleteable through any pointer.

Possibly not entirely correct -- might be problematic if UCODE objects are
deleted through a base pointer.
2020-07-25 19:41:16 -07:00
Jeff Young 4153309fba Add defensive code.
Fixes https://gitlab.com/kicad/code/kicad/issues/4941
2020-07-25 23:54:04 +01:00
Seth Hillbrand ad625d8d76 Add missing KIID to edge_module
In order to support grouping in the footprint editor, we need full KIIDs
stored with the footprint elements.
2020-07-25 14:10:53 -07:00
Seth Hillbrand 0a5f11fb37 Keep item ordering as much as possible
The ordering goes first by type and then by uuid.  In the case of
DRAWSEGMENT and EDGE_MODULE, we also sort by shape type before UUID.

Fixes https://gitlab.com/kicad/code/kicad/issues/4068
2020-07-25 12:56:19 -07:00
Jeff Young 2af6d01fdf Add some defensive code for empty polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/4947
2020-07-25 17:35:05 +01:00
jean-pierre charras 6f7d5f5e2b Footprint editor: fix some issues in flip and mirror commands.
more about fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-25 18:10:24 +02:00
Jeff Young bf445c1a95 Performance enhancements.
1) cache pad polygon outlines
   huge improvement in connectivity performance and a decent
   improvement in DRC performance
2) don't pre-allocate CONTEXT stack
   significant improvement in DRC rule performance
2) don't keep re-encoding strings
   decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young d1d7f5e7fa Fix text size in Edit Footprint dialog. 2020-07-25 13:03:33 +01:00
jean-pierre charras 377da31fcc D_PAD copy ctor and operator = : fix missing copy of pad name and pin function members. 2020-07-25 13:28:20 +02:00
jean-pierre charras bebba1df61 D_PAD copy ctor and operator = : fix missing copy of m_LengthPadToDie member. 2020-07-25 08:29:33 +02:00
jean-pierre charras b5960dfb40 class D_PAD: add Copy ctor and operator =.
Due to the fact basic primitives for custom pads are now managed by
a list of pointer, the default copy ctor and default  operator = do not work
(the basic primitives list must be duplicated).
It fixes issues related to primitives list id pad edition, footprint edition
and undo/redo

Fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-24 18:02:56 +02:00
Jeff Young f97c50bfde Give excluded DRC items their own layer.
(And fix a bug with the new mulit-layer zones and rule-based keepouts
at the same time which prevented me from testing it.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4954
2020-07-24 01:28:25 +01:00
Jeff Young 6529e339a9 Don't store context in the uCode. (It's not thread-safe.)
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young b60303efdb Fix crash due to uninitialised variable. 2020-07-23 17:20:32 +01:00
Jeff Young f2812773d4 Better handling of undefined values in Rule expressions.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
jean-pierre charras c254b331f3 Pcbnew: Activate pad fabrication property in pad properties dialog.
It was previously an option of advanced config since 6 months.
It is now not optional.
2020-07-23 14:33:24 +02:00
Jeff Young 86c9adbcba Add auto-completion for DRC rule function calls. 2020-07-22 21:28:02 +01:00
Tomasz Wlostowski 70b98c3b49 router: dump entire event log + annotated PCB upon user request 2020-07-22 18:05:54 +02:00
Tomasz Wlostowski 379aa8f3b5 router: clearer distinction between LOGGER and DEBUG_DECORATOR classes.
The first one keeps a log of events (start routing, mouse motion, etc).
The second allows for adding temporary debug drawings and messages which are stored synchronously with the events in LOGGER.

The event stream together with the PCB design (now with UUIDs) can be used to deterministically replay routing bugs as the user sees them.
2020-07-22 18:05:54 +02:00
Tomasz Wlostowski 2a2e389a94 router: auto-guess track posture from mouse movements, experimental! 2020-07-22 18:05:50 +02:00
Tomasz Wlostowski fd07e94760 router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable 2020-07-22 17:04:42 +02:00
Jeff Young a6b6084a60 Add preflighting for DRC rule function calls. 2020-07-22 14:33:32 +01:00
jean-pierre charras a61ea1fb0c Fix a compil warning 2020-07-22 09:02:30 +02:00
Ian McInerney 450107e453 Remove if statement with duplicated branches in router 2020-07-22 00:18:30 +01:00
Jeff Young fd647a1fa9 Code completion hookup to property manager. 2020-07-21 23:43:10 +01:00
Jeff Young c52df811ae Add expression eval to constraint min/max/opt values.
Also adds error reporting for above.
2020-07-21 23:43:10 +01:00
Jeff Young 7cbd166df7 Don't complain about duplicate names when the name didn't change. 2020-07-21 23:43:10 +01:00
Jeff Young beb5bad9b7 Initialize Scintilla with correct braces for sexpr grammar. 2020-07-21 23:43:10 +01:00
Ben Ellis 42a2f13464 Added a check that sexprs isn't empty before popping
This fixes a crash on malformed sexprs in the DRC rules panel
2020-07-21 14:52:48 +00:00
Jeff Young 1790c536ef Allow user layer names to be used in DRC rules.
I imagine this will also fix the property inspector, once it
gets merged.
2020-07-20 23:28:54 +01:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Mark Roszko 3b727b5d16 Make preference groups not selectable 2020-07-20 13:45:46 +00:00
Ian McInerney 20c1492b6a Initialize pointers to nullptr in copy constructor
Fixes https://gitlab.com/kicad/code/kicad/issues/4940
2020-07-20 11:31:34 +01:00
jean-pierre charras ba90416096 Pcbnew, legacy plugin (for .brd files): remove non working code.
This code controls the visibility of items, is not useful and does not
make sense for some items in current Pcbnew version.
2020-07-19 09:32:53 +02:00
Ian McInerney 967587adcc Guard against dynamic cast failure 2020-07-19 01:47:03 +01:00
Ian McInerney 50b2271f84 Fix missing variable initialization 2020-07-18 23:56:39 +01:00
Ian McInerney 2542d41481 Fix copy constructors for BOARD_DESIGN_SETTINGS and ZONE_CONTAINER 2020-07-18 23:55:06 +01:00
Seth Hillbrand 4aef369ca2 Remove accidentally committed test file 2020-07-18 13:03:22 -07:00
Ian McInerney 7b705af038 Refactor common QA components to create a single common library
This moves the program-specific code (e.g. BIU files) into
the program tests.

Also, create title_block.cpp to break a dependency that pulled
in eda_text.cpp when using the TITLE_BLOCK object.
2020-07-18 16:21:15 +01:00
jean-pierre charras a25f7cc0a4 Pcbnew, footprint editor: make switching layers visibility on/off working.
In footprint editor the board is a dummy board not managed by project settings,
so using its settings to manage layers visibility does not work.

Fixes #4924
https://gitlab.com/kicad/code/kicad/issues/4024
2020-07-18 10:31:06 +02:00
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
jean-pierre charras e7e1d5140e Pcbnew, DRAWSEGMENT plot function: add missing plot code for S_RECT shape.
Fixes #4905
https://gitlab.com/kicad/code/kicad/issues/4905
2020-07-17 11:26:35 +02:00
Jon Evans 5401f06fce Don't nag when we can't save project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4164
2020-07-16 22:56:02 -04:00
Jon Evans 5444a1b4b0 Only init display options after creating a canvas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4909
2020-07-16 22:27:03 -04:00
Jeff Young 944c9eac7c Allow Update Schematic from PCB to re-link based on refdes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00
Ian McInerney da6d0c9de6 Add cancel to the selection context menu if a tool is running
The selection tool's context menu is displayed during the move tool,
so it should contain the ability to cancel the current action.
2020-07-16 15:12:58 +01:00
Ian McInerney 5ba0855c36 Add move operators to MODULE
This fixes a memory leak in the std:: containers in MODULE
that is noticable when moving a module on the board and cancelling
the operation.
2020-07-16 02:11:51 +01:00
Ian McInerney af729d578f Unify settings reset buttons into one location 2020-07-16 00:08:16 +01:00
Ian McInerney b428364a98 Fix memory leak in color settings panel 2020-07-16 00:04:17 +01:00