Commit Graph

9544 Commits

Author SHA1 Message Date
Jeff Young e6a0732e64 Minor cosmetic issues. 2020-08-17 23:55:31 +01:00
Jeff Young 66ff16dd3d Better board-edge error reporting.
Fixes https://gitlab.com/kicad/code/kicad/issues/4950
2020-08-17 23:55:31 +01:00
Jeff Young 01eb8ad032 Better handling of excluded layers for Color Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/5184
2020-08-17 23:55:31 +01:00
Jeff Young 8234e70e77 Remove unused footprint text front & back colours. 2020-08-17 23:55:31 +01:00
Ian McInerney e825a99b9a Consolidate some UI conditions from context menu enabling
These conditions are for enabling/disabling a control,
so place them inside the new UI conditions framework instead
of the separate update routine.
2020-08-17 23:21:25 +01:00
Jeff Young aceed2b0a4 Cleaner look for colour swatches and the undefined colour. 2020-08-17 18:31:20 +01:00
Seth Hillbrand 5c3a1d059e Fix memory mgmt issue with SOLID shapes
We don't delete items from the CTOR but we do need to check if they
exist in the incoming SOLID before cloning

Fixes https://gitlab.com/kicad/code/kicad/issues/5214
2020-08-17 06:16:11 -07:00
Ian McInerney cff76e55d5 Only update the layer icon bitmap when it has actually changed
This was causing unnecessary calls to refresh the toolbar, causing
flickering in the layer widget.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5212
2020-08-17 12:37:25 +01:00
jean-pierre charras 5b365053db Fix a few I18n issues.
Especially, only ASCII7 chars can be used in messages.
Do not mark debug messages as I18n strings
2020-08-17 09:18:49 +02:00
Michael Kavanagh b06e605255 Remove duplicate code in Eagle PCB plugin 2020-08-17 03:02:44 +00:00
Jon Evans 595ea70b0f Don't rebuild on page change in MSW
This bug appears to not happen on MSW, so we can avoid the refresh

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5210
2020-08-16 18:42:50 -04:00
Jeff Young fd53df6f10 Collapse space out of the presets area.
Hopefully this will save us from conditional compilation as the
OSX spacing here is wildly different from GTK.
2020-08-16 22:22:47 +01:00
Jeff Young 1134d99bb7 Repair some more merge conflicts. 2020-08-16 22:22:47 +01:00
Seth Hillbrand 0debaa5866 Update selection ratsnest should do slow updates sometimes
When rotating/mirroring/etc, the selection ratsnest should be
recalculated to keep the lines correctly connected for the fast tree
move.

Fixes https://gitlab.com/kicad/code/kicad/issues/5194
2020-08-16 13:31:50 -07:00
Jon Evans 126565cbed Fix visibility control for Default netclass 2020-08-16 15:43:14 -04:00
Seth Hillbrand afc94fdec3 PNS: Be better about handling multiple layers
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Ian McInerney 4491f24d5e Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00:00
Ian McInerney 75cdf9df4e Don't say the board must be empty to be modified
It is possible to empty a full board and have modifications that
should be saved.

Fixes https://gitlab.com/kicad/code/kicad/issues/3739
2020-08-16 19:10:26 +00:00
Ian McInerney e8b11c911e Migrate Pcbnew/footprint viewer/footprint editor to the new UI update system 2020-08-16 19:10:26 +00:00
Ian McInerney d19ff3e595 Unify the UI IDs for actions between the menus and toolbars
By unifying the IDs so that an action only has one UI ID,
it will receive only one update event that will work for
all controls using the action.
2020-08-16 19:10:24 +00:00
Jeff Young 15edac4738 Implement a more flexible layout for the objects tab of appearances. 2020-08-16 19:51:26 +01:00
Jon Evans 54682d39ff Remember width of right AUI panel in PcbNew 2020-08-16 14:33:40 -04:00
Jon Evans 92174d414c Ensure pads and zones come up visible by default
These visibility layers didn't exist until now
2020-08-16 10:17:20 -04:00
Jon Evans 6bfb32245b Show the Default netclass in the appearance panel 2020-08-16 09:57:21 -04:00
Jon Evans 7da5419a2c Reduce flicker on layout change in MSW 2020-08-16 09:38:12 -04:00
Jon Evans 1f5a3c57a0 Fix net color radio buttons 2020-08-16 09:32:03 -04:00
Ian McInerney 453976be5e Add cleanup to the new appearance widget
It really should be cleaning up the heap-allocated objects
it owns.
2020-08-16 12:37:51 +01:00
Ian McInerney 25f2a13157 Fix pcbnew/fpedit editing options panel
The panel was incorrectly saving the preferences for the footprint
editor.
2020-08-16 12:37:50 +01:00
Ian McInerney ade7f529b8 Switch shared_ptr creation to using make_shared 2020-08-16 12:37:50 +01:00
Jeff Young 198d9a4243 Fix merge conflicts. 2020-08-16 12:26:15 +01:00
Jeff Young 92322667d6 Fix asserts on later wxWidgets versions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5197
2020-08-16 11:49:36 +01:00
Jeff Young e5f2015a9c More spacing adjustments for appearance manager. 2020-08-16 01:55:09 +01:00
Jeff Young 5938528a16 Move to conditional compilation for appearance palette spacing. 2020-08-16 00:43:19 +01:00
Jon Evans 103443f496 Back out some spacing changes for MacOS
These were too aggressive on other platforms
2020-08-15 19:20:49 -04:00
Jon Evans c124934831 Improve tooltips 2020-08-15 19:07:26 -04:00
Jon Evans 0db00046d1 Fix rendering of net colors on items 2020-08-15 18:50:44 -04:00
Jon Evans beab35472b Fix wrong style for slider
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5197
2020-08-15 18:50:44 -04:00
Jeff Young f83a9c0a22 Clean up some OSX issues in new appearance panel. 2020-08-15 23:26:58 +01:00
Jon Evans 2f604b4494 Add selection filter to footprint editor 2020-08-15 16:42:19 -04:00
Jeff Young 57c3d8e8d8 Make sure preview group gets added to view after a clear. 2020-08-15 21:13:44 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young b42395ec8d Attempt to fix locale issue with decimal separator in rules. 2020-08-15 17:32:13 +01:00
Jeff Young 6c74658a98 Finish arc implementation of m_ThirdPoint for EDGE_MODULEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5191
2020-08-15 17:32:13 +01:00
Jeff Young 7342532276 Remove auto. 2020-08-15 17:32:13 +01:00
Jeff Young 4410df50a8 Remove layer check that prevents synthetic layer drawing.
In this particular case it was LAYER_PAD_FR.

Fixes https://gitlab.com/kicad/code/kicad/issues/5190
2020-08-15 17:32:13 +01:00
Jeff Young dbb7859b7c Move Eagle routing layer to Dwgs.User (instead of Edge.Cuts).
Fixes https://gitlab.com/kicad/code/kicad/issues/1899
2020-08-15 17:32:13 +01:00
jean-pierre charras e4021a9ffa Fix some I18n issues.
Strings used for debug and strings containing only a print format like "%i"
are not translated
2020-08-15 17:56:32 +02:00
Seth Hillbrand a0c54951db pcbnew: Clean up group move
SetPosition() only changes the base position of tracks, we need to use
Move() to move the whole element.

This also cleans up white space and group handling in ratsnest

Fixes https://gitlab.com/kicad/code/kicad/issues/5188
2020-08-14 19:47:03 -07:00
Seth Hillbrand b8b3d5c16d pcbnew: Remove all threading from dynamic ratsnest
The last remaining threaded operation in dynamic ratsnest was the
recalculation of the dynamic connectivity map.  Because we do not
require any of the extra features of the connectivity map, we can get
away with a lightweight move of the anchors to update the ratsnest.  The
resulting connectivity tree is not valid but it is not needed for the
ratsnest, which only needs a list of nets/anchors.
2020-08-14 17:48:33 -07:00
Jeff Young ec5040aff5 Fix missing 'else' and EOF processing, both of which cause crashes. 2020-08-14 22:11:04 +01:00
Jeff Young 94ef2781bf Allow case-insensitive filtering and filter on keystrokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5177
2020-08-14 22:11:04 +01:00
Peter Montgomery 672224106c Pcbnew: Adjust soldermask dialog panel to scale properly
Added the wxExpand flag to all wxStatic Text widgets to prevent
text from being wrapped awkwardly under Linux (and possibly other
operating systems).

Made sure all sentences ended with a period.

Corrected some spelling mistakes.

Simplified tooltips to read and display better.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5168

~Also in this commit:
~Rephrased main warning note at top to emphasize get clearance
~settings from your board house.
~Moved two notes at top into tooltips for entry fields
~Removed note that solder mask and paste only apply to copper pads.
2020-08-14 19:51:57 +00:00
Tomasz Wlostowski 9cdada9eb4 PCB_EXPR_EVALUATOR: another string fix for wx 3.0 2020-08-14 14:36:27 +02:00
Seth Hillbrand 027b6c8cf9 Account for via width in connectivity
Fixes https://gitlab.com/kicad/code/kicad/issues/5176
2020-08-13 20:31:17 -07:00
Seth Hillbrand b351bec0d7 Handle blind/buried vias in connectivity 2020-08-13 20:14:23 -07:00
Jeff Young 7a6a6c2272 Reset active layer if it gets deleted in board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5118
2020-08-13 20:39:08 +01:00
Jeff Young 519bc80394 Replace error reporting in DRC rule compiler. 2020-08-13 18:47:41 +01:00
Jeff Young 0b17dbd123 Fix nesting issues in the DRC rule expression code generator.
We were executing function calls multiple times because we were
processing them at a depth the traversal algorithm wasn't expecting.
2020-08-13 18:36:10 +01:00
Jeff Young 2c60c4778e Do a layer-specific test only if the zone has the layer we're on.
Otherwise do a outline test (ie: for a keepout which isn't
layer-specific).
2020-08-13 16:16:36 +01:00
Tomasz Wlostowski 518a659185 Post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 47919cdc54 pcbnew/dialogs: use shared_ptr for RC_ITEM 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski ae5eab1d85 TRACKS_CLEANER: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski c607a60e3b PCB_EXPR_EVALUATOR: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski e907e43bd9 pcbnew/drc: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski d937fadd6f Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski f6ea753968 pcbnew: implement GetEffectiveShape() for tracks/vias/arcs/texts 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 59303adaca BOARD_ITEM: assert on unimplemented GetEffectiveShape() 2020-08-13 14:50:59 +02:00
jean-pierre charras e0351b4e4c Zone filler: make new algo (no thickness for filled outlines) the default
Add also a message info to the pcbnew constraints panel for arc to segment
approx min error value.
2020-08-13 10:01:23 +02:00
Jeff Young a407befa4c Fix breakage from layer change.
We have to be careful about processing edges on the Edge_Cuts even
when we're talking about a zone on some other layer.
2020-08-13 00:18:09 +01:00
Jeff Young 0c9d08249f Fix crash where dummy edge doesn't have a valid parent. 2020-08-13 00:07:59 +01:00
Jeff Young e05cd0e914 Raise limit to prevent zooming on cross-probing.
Fixes https://gitlab.com/kicad/code/kicad/issues/5149
2020-08-12 22:28:18 +01:00
Jeff Young 393bb0fd83 Fix assert where geometry routine wasn't ready to handle layers.
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Jeff Young 463100d67f Remove a long-standing hack to keep divots out of adjacent zones.
The new algorithm unions any adjacent zones before doing the
chamfer/fillet and then subtracts the other zones back out afterwards.

Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-12 22:20:08 +01:00
Jeff Young a6d44676b3 Move commit handling outside of ZoneFiller.
This allows us to rever the commit on a cancel.

Fixes https://gitlab.com/kicad/code/kicad/issues/5107
2020-08-12 22:20:07 +01:00
Jeff Young fad18dccd5 Make sure board design settings get updated when switching boards.
Fixes https://gitlab.com/kicad/code/kicad/issues/5129
2020-08-12 22:20:07 +01:00
Jeff Young 84425f5a40 Fix crash bug from bad static_cast. 2020-08-12 22:20:07 +01:00
Graham Keeth 9057a46a20 circular pad array wizard: pin 1 optionally square
Add option to make pin 1 rectangular to Circular Pad Array wizard.
Default behavior is unchanged (oval pin 1).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4614
2020-08-12 20:49:55 +00:00
Seth Hillbrand c4de3c8f1a Move mutual capacitance wizard to correct folder 2020-08-12 11:26:01 -07:00
Qbort b41892e4da Rename class GROUP in pcbnew to PCB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5156
2020-08-12 15:36:08 +01:00
Seth Hillbrand d8d8f4f670 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
2020-08-12 06:22:45 -07:00
Blake Smith 9614f6d0d9 Fix PadGridArray super call 2020-08-12 06:22:45 -07:00
Seth Hillbrand ab58b67842 Adding triangulation viewing to AC
This adds a helper routine to visualize the quality of our
triangulation.  It also renames an excessively long variable name for
the arc editor
2020-08-12 06:22:45 -07:00
jean-pierre charras eae739d98e ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(): for polygons with outline
thickness, use another algo to create shapes mainly used in 3D viewer.
For the 3D viewer, the calculation time to build zones is significantly faster.
2020-08-12 10:13:54 +02:00
Ian McInerney 47f7c616f8 Fix Python environment variable handling
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.

Also, improve the environment variable tracing infrastructure to capture
more changes.
2020-08-12 00:14:19 +01:00
Jeff Young d97e519036 Fix typo in regex.
Had to get rid of the regex as Search actually changes the user's
selection, which is not what we want.  (It wasn't earlier because
the search would always fail due to the typo.)

It's much faster now that we're not scanning from the beginning every
time.
2020-08-11 22:04:38 +01:00
Jeff Young bc9723340a Add support for print-as-per-items-tab.
ADDED a print mode which allows the Layers Manager's Items tab to
control the visiblity of various items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3894
2020-08-11 20:42:08 +01:00
Jeff Young 7f65b31cb6 Beautify the PCBNew print dialog.
Mostly fix some uneven spacing, but also indent the color theme
selection under the checkbox which controls it.
2020-08-11 20:42:08 +01:00
Joshua Redstone ee428876ec ADDED: Group/Ungroup function
This implements the group/ungroup functions to mark a set of EDA_ITEMs as a unit, allowing them to be moved and rotated as a unit
2020-08-11 19:37:07 +00:00
Jeff Young f65a0037dc Display violation layer (and select it) for DRC errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5123
2020-08-11 17:47:39 +01:00
Jeff Young 8b67d5185a Update keepout rule syntax example to something with less "magic". 2020-08-11 15:22:48 +01:00
Jeff Young a0f95855d1 ADDED board repair tool.
Currently it just fixes duplicate UUIDs.
2020-08-11 15:02:27 +01:00
Jeff Young 5ab39b7c06 Clean up reannotation UI. 2020-08-11 15:02:27 +01:00
jean-pierre charras 9c817638d9 ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(): fix incorrect transform
For zones filled using the new algo (filled areas without thickness), a outline
with thickness was added, that is incorrect.
Used only in 3D viewer.
2020-08-11 11:49:08 +02:00
jean-pierre charras 29d6fe88f0 3D viewer: do not show via/pad shapes of pads not connected on copper layers.
Show the same vias/pad shapes as plot functions.
2020-08-11 11:26:00 +02:00
PJM a06a0c1236 Fix Pcbnew tree order in "Preferences" tree
Eeschema and Pcbnew display the same dialog panels in a different order
in the 'Preferences' tree.  This code make Pcbnew match the order of
Eeschema.

Fixes issue: https://gitlab.com/kicad/code/kicad/-/issues/5147
2020-08-10 19:01:04 -07:00
Ian McInerney e03f6a3b49 Pcbnew: Route all display options updates through the frame
The frame contains the main option set that is used for setting the UI
state, so it must be updated. The frame also updates the view when set,
so calling the view separately to update the options isn't needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5069
2020-08-11 01:20:11 +01:00
Ian McInerney 0a0ed9e064 Escape all env var strings sent to the Python interpreter
Fixes https://gitlab.com/kicad/code/kicad/issues/5130
2020-08-11 00:51:02 +01:00
Jeff Young 9716c62e32 Performance enhancements for PCBNew scrolling and zooming.
Fixes https://gitlab.com/kicad/code/kicad/issues/5136
2020-08-10 23:43:24 +01:00
Jeff Young e1c449902d Ask user before throwing away changes to DRC Rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Jeff Young de6314e3b5 Convert smart quotes and dashes to ASCII in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Seth Hillbrand f36c158696 Remove via contact minimum from connectivity check
Connectivity takes an absolute approach to whether elements are
connected.  DRC will be adjusted to check to illegal necks that are less
than the board minimum width
2020-08-10 14:47:49 -07:00
Seth Hillbrand e5ab97994d pcbnew: Fix error in proximity calc for zones
Zone ContainsPoint() accuracy should be calculating the radial distance
and so does not need to be halved.
2020-08-10 14:46:34 -07:00
Seth Hillbrand 5096deeb3b pcbnew: Handle module ratsnest
Ensure we display the module ratsnest appropriately
2020-08-10 12:09:32 -07:00
Seth Hillbrand 211cbadc24 pcbnew: MODULEs are not BOARD_CONNECTED_ITEMS
Handling ratsnest requires first checking for modules, handling their
pads and then checking that the remaining elements derive from
BOARD_CONNECTED_ITEM

Fixes https://gitlab.com/kicad/code/kicad/issues/5131
2020-08-10 11:01:03 -07:00
jean-pierre charras 23a5b0ca5f fix a few compil warnings and a Coverity warning. 2020-08-10 18:32:44 +02:00
Jeff Young 34705fd8b2 More clone vs duplicate bugs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5120
2020-08-10 14:45:01 +01:00
Jeff Young 692aeff334 Fix a bunch of usages of copy ctor that really meant duplicate.
In particular, "duplicate" means "with a new KIID".

Fixes https://gitlab.com/kicad/code/kicad/issues/5127
2020-08-10 14:23:11 +01:00
Ian McInerney dbede14ed2 Remove extra include accidentally added 2020-08-10 10:43:19 +01:00
jean-pierre charras 19602b0806 Pcbnew: do not include swig/python_scripting.h when compiling without python support.
Fixes #5132
https://gitlab.com/kicad/code/kicad/issues/5132
2020-08-10 11:35:52 +02:00
Seth Hillbrand 370bc89d5a Lowercasing private variables in class_pad 2020-08-10 03:27:27 +00:00
Seth Hillbrand 2c8d20207e Allow micro-via to begin/end in middle layers
Microvias can be drilled through adjacent layer pairs, not just F_Cu and
B_Cu
2020-08-10 03:27:27 +00:00
Seth Hillbrand 41edf5c5bf Updating DRC to handle vias with differing layers 2020-08-10 03:27:27 +00:00
Seth Hillbrand 9a66a5acad Cleanup code line endings 2020-08-10 03:27:27 +00:00
Seth Hillbrand 5fc6b74c89 ADDED: Remove unused pads
This option removes copper layers from pads and vias where they are not
connected to other board elements.  This allows the inner layers to be
more closely routed if the via landing pad is not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/1835
2020-08-10 03:27:26 +00:00
Seth Hillbrand 2fc266ef02 Cleanup old defines/dead code 2020-08-10 03:27:26 +00:00
qu1ck 1bb6d4e22c Fix pads python api compatibility
* Add GetCustomShapeAsPolygon() to swig wrapper
* Make shared_ptr<SHAPE_POLY_SET> usable for GetEffectivePolygon()

Fixes #4999
2020-08-10 03:22:24 +00:00
Ian McInerney 265c6fa3b7 Improve color theme support in the footprint preview widget
This ensures the colors used by the status text pane in the preview
widget are the same as the canvas, so there is a seemless transition
between the two.

Additionally, remove the scrollbars from the symbol preview widget
in the place symbol dialog - they are pointless.
2020-08-10 02:29:15 +01:00
Fabien Corona 133d082cc5 Pcbnew fix arc edition 2020-08-09 23:03:31 +00:00
Jon Evans abc64f228b Use wxAtoi instead of atoi 2020-08-09 18:26:54 -04:00
Jeff Young 78fb6a384d Fix wxWidgets debug assert on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/5121
2020-08-09 22:13:29 +01:00
Jon Evans ec0d8dc5e5 Fix inadvertent change to license text 2020-08-09 16:09:26 -04:00
evils cc6f582aa3 Pcbnew: Fix typo in drill file generation dialog
From https://gitlab.com/kicad/code/kicad/-/merge_requests/335
2020-08-09 19:56:12 +01:00
Ian McInerney c458b50fd9 Ensure the environment variables are synchronized between KiCad and Python
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 19:56:12 +01:00
Ian McInerney e57499fde9 Fix where the Python plugins are pointing to
This isn't truely correct, because it is pointing to the
main KiCad path, but it is more correct than pointing to
the system path. This should really be pointing to the
user path

(see https://gitlab.com/kicad/code/kicad/-/issues/5115)
2020-08-09 19:56:12 +01:00
jean-pierre charras 9b3ff5af47 Fix a few I18N issues.
Especially keywords should not be included in translated strings.
2020-08-09 20:38:35 +02:00
Jon Evans db811510af Improve layout of reannotate dialog 2020-08-09 13:04:33 -04:00
Jon Evans 5abc85aa80 Cleanup re-annotation code style 2020-08-09 12:43:05 -04:00
bjpiccioni d08bf90576 ADDED: Geographic Reannotation 2020-08-09 12:43:05 -04:00
Jon Evans 2d84092457 Fix build issue in c9925704 2020-08-09 12:43:05 -04:00
Jon Evans 43ab43ec9e Fix a few issues with Close Project
A new empty project needs to be reopened for now
Footprint info cache write only works with a project for now
2020-08-09 11:13:50 -04:00
Jeff Young c992570427 Add Open Python directory to menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/5115
2020-08-09 15:39:51 +01:00
Jeff Young 3b280e4886 Keep properties across an Exchange_Module call.
This is also used when saving a footprint from the Footprint Editor
back to the board.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5114
2020-08-09 15:39:51 +01:00
Jeff Young 4317881012 Improve delete-unused-layers to better handle multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5116
2020-08-09 15:39:51 +01:00
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