Commit Graph

8008 Commits

Author SHA1 Message Date
Jeff Young aa4d7682ca Don't shove stitching vias.
Whether or not it's a good idea, the current algorithm doesn't support
it and leaves them on top of each other.

Fixes: lp:1833214
* https://bugs.launchpad.net/kicad/+bug/1833214
2019-07-21 16:38:06 -06:00
Jeff Young 6f44b00b2c Add support for hole collisions to PNS. 2019-07-21 16:38:06 -06:00
Jeff Young b79d2d9258 Cleanup. 2019-07-21 16:38:06 -06:00
jean-pierre charras 346495ae31 Fix errors in DIALOG_BOARD_STATISTICS.
(some values were not in the right column or row)
2019-07-21 16:45:37 +02:00
jean-pierre charras 88801f46d9 Fix issues in DIALOG_BOARD_STATISTICS:
- make it wxWidgets 3.1 compatible.
- internationalize.
- fix minor wxwidgets alert.
- remove settings for fg/bg color: the result is unpredictable:
was black texts on black background on my computer.
2019-07-21 12:01:36 +02:00
Jeff Young ab7cf4a2b0 A bit of visual cleanup for the new Board Statistics dialog. 2019-07-20 14:39:08 -06:00
Alexander bb290abe91 added board statistics dialog, which shows info for production and assembly 2019-07-20 14:39:08 -06:00
jean-pierre charras 858db3c104 Synchronize toolbars state with current options after rebuilding them.
Previously, for instance after modifying preferences or language,
they were rebuilt but the tools state was not set due to a missing call to SyncToolbars() after rebuilding.
2019-07-20 18:16:35 +02:00
Jeff Young b5e01ea163 Initialize plot with aux origin checkbox.
Fixes: lp:1836923
* https://bugs.launchpad.net/kicad/+bug/1836923
2019-07-20 07:54:40 -06:00
Jeff Young 4a1edf581e Update DXF units drop-down.
Fixes: lp:1836927
* https://bugs.launchpad.net/kicad/+bug/1836927
2019-07-20 07:48:16 -06:00
Jeff Young d746ba892d Make sure the postion relative tool gets activated when used.
Fixes: lp:1836978
* https://bugs.launchpad.net/kicad/+bug/1836978
2019-07-19 20:14:40 -06:00
Jeff Young 02eb1d2c62 Don't try and run drawing tools in ModEdit with no module selected.
Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
Jeff Young 0b08e4dcd2 Deactivate other tools when running one based on a PICKER.
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".

Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
jean-pierre charras 176b1a0fd5 FP editor: fix crash when trying to save a footprint (Ctrl+S) when no footprint loaded. 2019-07-19 19:06:16 +02:00
jean-pierre charras b4fc78fc0d kicad_plugin.cpp: fix incorrect detection of existing footprints in PCB_IO::FootprintExists(), when fp names contain a point.
Fixes: lp:1837221
https://bugs.launchpad.net/kicad/+bug/1837221
2019-07-19 18:16:07 +02:00
Seth Hillbrand bacbe86756 pcbnew: Make clearance translucent
This sets the clearance outline to a slightly better opacity to allow
viewing of items behind the routed track clearance.  Future work should
include making this a configuration option.

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

(cherry picked from commit e0589d2908)
2019-07-18 10:47:27 -07:00
jean-pierre charras f4c1730b7c Pcbnew, footprint tree selector: make the selected items readable.
Previously, the background was highlighted, but not the text.
On Windows, the text was unreadable, until it was selected.
Now the foreground color is also set to the text selected color.

Similar to fix 34e00bdb6d, but for the fp editor.
2019-07-18 14:54:52 +02:00
Seth Hillbrand b31212def2 pcbnew: Ensure we don't overflow export
\u%4.4 can output between 7-11 bytes, which can overflow and not allow
the null terminator to be represented.
2019-07-17 18:24:25 -07:00
Jeff Young 3de00eef5f Cleanup. 2019-07-17 21:45:43 +01:00
Jeff Young d67c2d13c7 Fix re-entrancy problem in cross-probing.
Fixes: lp:1836940
* https://bugs.launchpad.net/kicad/+bug/1836940

Fixes: lp:1836937
* https://bugs.launchpad.net/kicad/+bug/1836937
2019-07-17 21:35:28 +01:00
Jeff Young 7c1049d86b Fix event-loop issue with some pickers.
RunAction returns immediately even when called with "run now" flag.

Fixes: lp:1836905
* https://bugs.launchpad.net/kicad/+bug/1836905
2019-07-17 21:35:28 +01:00
Tomasz Wlostowski 5bb06e5ac5 pcbnew: can't return a copy of ptr_vector if items are polymorphic and have no clone() methods. Work it around. 2019-07-17 08:10:47 -04:00
jean-pierre charras 164d40f235 Zone filled, non copper zones: fix missing inflate for non stroked solid areas. 2019-07-17 13:24:21 +02:00
Jeff Young b9749d361b Turn of pad mask layers if Eagle file specifies stop="no"
Fixes: lp:1835930
* https://bugs.launchpad.net/kicad/+bug/1835930
2019-07-17 01:03:34 +01:00
Jeff Young ba7ad7ddf4 Fix bug with PCBNEW_PICKER_TOOL not doing a push/pop.
PICKER_TOOL got updated but PCBNEW_PICKER_TOOL didn't.
2019-07-16 20:25:25 +01:00
Jeff Young 8d79661996 Convert symbol/module cross-probing to a selection model.
Net/net cross-probing stays a highlight model.

Fixes: lp:1836600
* https://bugs.launchpad.net/kicad/+bug/1836600
2019-07-16 20:25:25 +01:00
Seth Hillbrand 5ff7c61003 eagle: Fix segfault importing flipped footprints
We don't have a board reference when importing, so we don't get settings
for flip orientation.
2019-07-16 09:08:58 -07:00
Jeff Young 2c5876ee8c Add more control over how corners are handled when inflating polygons. 2019-07-16 16:41:21 +01:00
Jeff Young 27aacb26f8 Cleanup. 2019-07-16 02:31:07 +01:00
Jeff Young ceb6a49f0c Attempt to fix double-selected radio button on GTK.
Fixes: lp:1836538
* https://bugs.launchpad.net/kicad/+bug/1836538
2019-07-16 02:23:38 +01:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young 58ca5b71a9 A more robust fix for 36f1d023f0.
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.

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

Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
Jeff Young 6da11de5e0 Be more careful about thermal reliefs for pads on different layers.
Fixes: lp:1605049
* https://bugs.launchpad.net/kicad/+bug/1605049
2019-07-14 23:15:39 +01:00
Jeff Young a3c74051c2 Allow edits to self-intersecting polygons.
1) Intermediate states might be self-intersecting, and we shouldn't
be policing our users on what order to do things in
2) The polygon might already be self-intersecting, at which point we're
preventing the user from fixing it.

Also includes better const management for SHAPE_POLY_SET API.

Fixes: lp:1833831
* https://bugs.launchpad.net/kicad/+bug/1833831
2019-07-14 18:18:48 +01:00
Jeff Young fe188489c7 A better hack for the post-ProgressReporter-loss-of-focus issue. 2019-07-14 18:18:48 +01:00
Jeff Young 928d6c5dff Implement preserved-corners to prevent divots when filling adjacent zones.
Fixes: lp:1460787
* https://bugs.launchpad.net/kicad/+bug/1460787
2019-07-14 18:18:48 +01:00
Jeff Young 1a7cef2950 Improve performance, commenting and API of some polygon classes. 2019-07-14 10:39:38 +01:00
Jeff Young 560fda70a2 Update position before first mouse-move-event.
Fixes: lp:1780426
* https://bugs.launchpad.net/kicad/+bug/1780426
2019-07-14 10:39:38 +01:00
Jeff Young 1dbaa89f95 Fix a bug in tool activation/deactivation and another illegal static_cast.
Fixes: lp:1836419
* https://bugs.launchpad.net/kicad/+bug/1836419
2019-07-14 10:39:38 +01:00
Jeff Young 37af3adffb Add preference for flip axis.
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Jeff Young a3855cb4f2 Allow thermal spokes to be same width as minimum width.
Also some changes for readability and clarity, both in the code
and in the Feature Constraints panel.

Fixes: lp:1835674
* https://bugs.launchpad.net/kicad/+bug/1835674
2019-07-14 10:36:48 +01:00
Jeff Young 2d17d2b91f Cleanup and commenting. 2019-07-14 10:36:48 +01:00
jean-pierre charras fc2379ca8a Fix some issues in .gbrjob file.
2 issues are fixed: a missing double quote, and a incorrect handling of unicode chars

Fixes: lp:1836448
https://bugs.launchpad.net/kicad/+bug/1836448
2019-07-14 10:23:45 +02:00
jean-pierre charras be5f3717c7 Fix minor wxWidgets alerts. 2019-07-13 18:32:18 +02:00
Seth Hillbrand f2f2b4bcf9 Explode/Combine in terms of visible elements
When generating a complex pad, this allows the user to combine with a
rotated pad and explode rotated pads without needing to rotate elements
to 0 orientation first.

Fixes: lp:1808137
* https://bugs.launchpad.net/kicad/+bug/1808137
2019-07-12 16:55:41 -07:00
Seth Hillbrand c86b4928a7 Fix assert in footprint editor
PCB_EDIT_FRAME does not return for footprint editor.  The
PCB_EDIT_BASE_FRAME is needed for common fns between pcbnew and modedit
2019-07-12 13:34:30 -07:00
Ian McInerney 39954b20fe pcbnew: Make the netlist class panel usable with a lot of classes
Fixes: lp:1826154
* https://bugs.launchpad.net/kicad/+bug/1826154
2019-07-12 10:22:59 -07:00
Jeff Young 20036f8105 Add FootprintExists() which can be more careful about FS differences.
(And in particular, MSW's case-insensitive FS.)

Fixes: lp:1835999
* https://bugs.launchpad.net/kicad/+bug/1835999
2019-07-11 23:00:01 +01:00
Jeff Young 6c9e34e799 Don't let visibility bit get nuked when updating effects.
Fixes: lp:1836183
* https://bugs.launchpad.net/kicad/+bug/1836183
2019-07-11 18:19:29 +01:00
Jeff Young 807b8d4cf1 Lower x (or y) value always defines "Start Point".
"End Point" is the other.  (The user doesn't care what the variable
names in the code are.)

Also re-lays-out the dialog for better comprehension.

Fixes: lp:1694964
* https://bugs.launchpad.net/kicad/+bug/1694964
2019-07-11 17:36:32 +01:00
Ian McInerney ff9d899ae0 pcbnew: Clean up warnings with unit handling in the DXF export 2019-07-10 12:21:01 -04:00
Jeff Young ecc5fc9894 Cleanup. 2019-07-10 01:38:02 +01:00
Jeff Young 13d61e4b2b Cleanup. 2019-07-10 01:14:21 +01:00
Jeff Young 483dc24e87 Homogenize selection tools around our HIG.
In particular make addative and exclusive-or selections work the
same way.

Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
Jeff Young b0b9c5ab63 Fix copy/paste error. 2019-07-09 16:54:02 +01:00
Jeff Young 36f1d023f0 Make sure Push/PopTool() go in the right order.
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool().  The new
tool is therefore pushed before the old tool is popped.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young d7f3a38510 If we're plotting small drill marks then we need to plot the pad even if the hole is the same size.
Fixes: lp:1835617
* https://bugs.launchpad.net/kicad/+bug/1835617
2019-07-09 13:07:36 +01:00
Jeff Young 3a8f32c380 Convert ShowEEschema to an ACTION so it can get a hotkey assignment.
Fixes: lp:1686010
* https://bugs.launchpad.net/kicad/+bug/1686010
2019-07-09 00:43:41 +01:00
Jeff Young b8013648d2 Change behaviour of increase/decrease track width & via size when there's a selection.
They now modifiy the selection if it contains only tracks and/or vias,
and modify the current widths/sizes otherwise.

Fixes: lp:1814908
* https://bugs.launchpad.net/kicad/+bug/1814908
2019-07-08 22:18:25 +01:00
Jeff Young 183687c69e Cleanup and a big hack to prevent keyboard focus loss.
Fixes: lp:1810993
* https://bugs.launchpad.net/kicad/+bug/1810993
2019-07-08 20:45:42 +01:00
Jeff Young 772dff7a01 Removed post-page-settings ZoomFitToScreen() calls.
Fixes: lp:1834608
* https://bugs.launchpad.net/kicad/+bug/1834608
2019-07-08 00:06:28 +01:00
Jeff Young a11f3a0b80 Make <esc> unhighlight nets, but only after all tools have been cleared.
Also moves the Highlight Net hotkey from activating the tool to just doing
a one-shot highlight.

Fixes: lp:1835658
* https://bugs.launchpad.net/kicad/+bug/1835658
2019-07-08 00:02:25 +01:00
Jeff Young 986392d88e Update item at start of drag to erase original location.
Fixes: lp:1813038
* https://bugs.launchpad.net/kicad/+bug/1813038
2019-07-07 22:30:18 +01:00
jean-pierre charras a833aeeacb Pcbnew: cosmetic enhancement: add missing icons to 2 menuitems in "Route" menu 2019-07-07 18:12:04 +02:00
Jeff Young 70ca02537d Don't split track when via is placed at one of its ends.
Zero-length tracks are just a pain.

Fixes: lp:1813077
* https://bugs.launchpad.net/kicad/+bug/1813077
2019-07-06 22:54:31 +01:00
Jeff Young a991625f56 Don't refill zone from external change.
We may later add an Automatic Zone Fill option which would restore
this, but for now I'm turning it off to see if it fixes the crash
bug.

Fixes: lp:1834718
* https://bugs.launchpad.net/kicad/+bug/1834718
2019-07-06 22:38:25 +01:00
Jeff Young 174c276883 Expose TrackWidthNext/Prev and ViaSizeNext/Prev in hotkey list.
Fixes: lp:1835616
* https://bugs.launchpad.net/kicad/+bug/1835616
2019-07-06 20:47:39 +01:00
Dave Vandenbout 44734dc059 python: Return copy of netclasses not reference
Fix Board.GetAllNetClasses() so it no longer creates a duplicate of the Default netclass in the design rules net classes list.

Fixes: lp:1803623
* https://bugs.launchpad.net/kicad/+bug/1803623
2019-07-06 07:40:33 -07:00
Seth Hillbrand 3d8d852990 Fix board setup issue with reloading
Previous fix for the non-updated netclass pointers caused issues with
display of overlay view items and was bigger than needed to be.  Just
resetting the tools gets the pointers released.

Fixes: lp:1835533
* https://bugs.launchpad.net/kicad/+bug/1835533
2019-07-06 06:43:43 -07:00
Jeff Young 7ee6afeace Performance improvement for zone filling. 2019-07-06 00:04:54 +01:00
Jeff Young 50f6844e71 Move Zone Display hotkey because Z is already in use (reset grid origin).
Fixes: lp:1835471
* https://bugs.launchpad.net/kicad/+bug/1835471
2019-07-06 00:04:54 +01:00
Jeff Young 562ab0bdea Move layer defaults and diff-pair dimensions to board file. 2019-07-06 00:04:54 +01:00
Seth Hillbrand 09100100c9 pcbnew: Reload board after changing board paramters
The old board pointer maintains shared pointers to netclasses (among
other things) that do not get released by the
SynchronizeNetsAndClasses() call.  We reload the board to fully release
the pointers.

Fixes: lp:1835533
* https://bugs.launchpad.net/kicad/+bug/1835533
2019-07-05 13:50:29 -07:00
Jeff Young f20335cefe Apply fix from 5.1 branch.
Fixes: lp:1834111
* https://bugs.launchpad.net/kicad/+bug/1834111
2019-07-05 14:45:15 +01:00
Jeff Young a9c66e15ea Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
Jeff Young 867585c1f2 Don't allow keepout zones to match no-net tracks.
Fixes: lp:1819250
* https://bugs.launchpad.net/kicad/+bug/1819250
2019-07-05 14:45:15 +01:00
Jeff Young bcd48d4bc2 Use common actions where possible. 2019-07-05 14:45:15 +01:00
jean-pierre charras becd6a6f9d Microwave tools: better tooltips 2019-07-04 11:28:41 +02:00
Jeff Young 1548dcfe8d Fix typo in Pad Enumeration tool.
Fixes: lp:1831950
* https://bugs.launchpad.net/kicad/+bug/1831950
2019-07-03 18:53:13 +01:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

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

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

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
Jeff Young a2fe319b92 Fix bug introduced when edge-thickness adjustments were moved.
Fixes: lp:1835132
* https://bugs.launchpad.net/kicad/+bug/1835132
2019-07-03 12:12:00 +01:00
Jeff Young 0eed5175cc Fix crash in Pcbnew drawing tools.
Couple of typos: return !cancelled instead of cancel, and some breaks
on the wrong side of the braces.

Fixes: lp:1835172
* https://bugs.launchpad.net/kicad/+bug/1835172
2019-07-03 11:44:30 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
Seth Hillbrand 9460f207f5 Fix misc build warnings
This removes unused static function in page layout editor, unused
variable in pcb_painter and restors the gcc unitialized fix for
pcbnew's drawing_tool.
2019-07-02 10:32:49 -07:00
Jeff Young 1c30f3d9a9 Give up on KillFocus validation.
wxWidgets sends the KillFocus event before the Cancel button event,
and it sets the receiving-focus window pointer to NULL (so you can't
even check for it being the Cancel button.  Last time around (with
the UNIT_BINDER) I also tried a bunch of hacks for whether the window
pointer is NULL, etc., but they aren't discriminatory either.

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

Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
2019-07-02 17:04:08 +01:00
Jeff Young da71a51029 Cleanup. 2019-07-02 00:48:05 +01:00
Jeff Young 29db6152b3 Only warn once in KillFocus for each error value in footprint name.
More than that just gets annoying, and there is at least one edge case
which throws us into an infinite loop if we don't have something to
break us out.

Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
2019-07-02 00:47:52 +01:00
Jeff Young faa730dfb1 Fix highlight bug.
Fixes: lp:1834960
* https://bugs.launchpad.net/kicad/+bug/1834960
2019-07-01 22:15:25 +01:00
Jeff Young 9effd24f3a Allow move tool to run on top of other tools.
Fixes: lp:1784480
* https://bugs.launchpad.net/kicad/+bug/1784480
2019-07-01 22:15:25 +01:00
Jeff Young ad26ece8d4 Add Global Edit Text and Graphics Properties to Eeschema.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
Seth Hillbrand 743c650129 Move zone refill to action
This unifies the zone refill across architecture into the tool-based
architecture.  Also provides ZONE_FILLER-based progress managment for
tools.

(cherry picked from commit be9cd98cb1)
2019-07-01 09:27:04 -07:00
jean-pierre charras 978c4fd7d3 Pcbnew, export_footprints_placefile.cpp: code refactor.
Make the data generation code separate from the dialog code.
The dialog itself does not include anymore the data generation code.

Non SMD footprints forced in list are now displayed in the dialog.
The attribute MOD_CMS is no longer silently modified (without undo command) by the dialog.
2019-06-30 18:27:12 +02:00
Seth Hillbrand 7297208119 Handle all non-length units
Statusbar length updates need to handle default with wxASSERT if there
is not a specific, handled unit.
2019-06-29 09:46:25 -07:00
Seth Hillbrand d650cca088 Enforcing rational limits on length tuner
The length tuning dialog needed validators on close to prevent negative
and percentages >100%

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

(cherry picked from commit 3974c6fd89)
2019-06-29 09:38:27 -07:00
Jeff Young a498d7e9c5 Try out a new arc-editing paradigm for LibEdit.
This is based on the notion that in Kicad the start and end-points
are far more important (as they usually connect to other segments)
than the center is.
2019-06-29 16:10:58 +01:00
jean-pierre charras bcf690f901 TRACKS_CLEANER algo to merge collinear track segments: some minor fixes. 2019-06-29 09:12:19 +02:00
Seth Hillbrand 3a94ccd6a3 pcbnew: Drop tracks not on copper
We do not allow non-copper routed tracks and they will break assumptions
elsewhere in the code.  We drop them in the beginning so that they are
not saved.

(cherry picked from commit cabfcbc73c)
2019-06-28 19:28:55 -07:00
jean-pierre charras c9ccd8a642 Fix broken TRACKS_CLEANER algo to merge collinear track segments. 2019-06-28 20:23:09 +02:00
jean-pierre charras 71aafb6eb3 Pcbnew, connectivity: fix incorrect detection of dangling track ends when a end is inside a zone.
This end was not detected as connected by the IsDangling method.
Fix incorrect cleaning of dangling tracks in track cleaner.
Remove also a dead code.
The merge co-linear track segments is still full bugged in track cleaner.
2019-06-28 15:25:50 +02:00
Jeff Young 3135334c0c Hook up zone-connection controls in Edit Footprint dialog.
Fixes: lp:1834629
* https://bugs.launchpad.net/kicad/+bug/1834629
2019-06-28 12:24:15 +01:00