Commit Graph

7609 Commits

Author SHA1 Message Date
Jeff Young a967adbf26 Don't toggle selection twice when trying to select.
Also fixes issues with trying to use a CONTEXT_MENU as a wxMenu.
2019-04-23 14:19:55 +01:00
Tomasz Włostowski 9e00f48efc router: copy m_maxClearance when cloning/branching PNS::NODEs
Fixes: lp:1813328
* https://bugs.launchpad.net/kicad/+bug/1813328
2019-04-23 12:00:54 +02:00
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Jeff Young e885d739a4 Simiplify VECTOR2 -> wxPoint conversions.
There has always been an operator specified, but it's explicit so
most folks don't notice it.
2019-04-22 22:08:18 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
jean-pierre charras 223e24f423 export_hyperlynx.cpp: better message in a warning. 2019-04-21 12:03:00 +02:00
Simon Richter 2b3b26b502 Remove two extraneous spaces from a tooltip 2019-04-20 22:04:22 +01:00
John Beard 02fca8e0df Pcbnew: fix -Wmaybe-uninitialized in legacy PCB plugin
In the failure case, the "makeType" is uninitialised. In a non-debug
build, wxFAIL will compile out and the uninitialised behaviour will
happen silently. In a debug build, it'll assert, and then do the
uninitialised behaviour anyway.

Continue explicity to avoid this.
2019-04-18 15:28:33 +01:00
Jon Evans 7030c7d948 Don't show added nets multiple times during dry run update 2019-04-17 22:57:20 -04:00
Jon Evans 105825c058 Refactor Import Netlist to use the same codepath as Update PCB 2019-04-17 22:57:19 -04:00
jean-pierre charras c1c5afad67 fix in qfn_wizard.py 2019-04-17 18:02:22 +02:00
jean-pierre charras 68e6308066 Fix qfn_wizard.py wizard.
(a parameter controlling pad position offset was also used in pad size, that creating incorrect pad size).
2019-04-17 13:46:35 +02:00
jean-pierre charras acf6c0ae2c BOARD_NETLIST_UPDATER: fix 2 serious issues in dry run (memory leak and incorrect single pad nets deletion)
Single pad nets deletion in dry run was incorrect when a new footprint was added, because in dry run it is not actually added,
and the single pad nets deletion does not see these new pads, and can (incorrectly) delete some nets.
2019-04-17 13:39:55 +02:00
Jeff Young ecfa05e2ca Allow adding symbols/footprints from editors and browsers.
This was always possible from modal browsers and from the footprint
editor, but it's now also possible from non-modal browsers and the
symbol editor.

Fixes: lp:920380
* https://bugs.launchpad.net/kicad/+bug/920380
2019-04-16 16:20:51 +01:00
Jeff Young 32c86a4ca4 Move place symbol to modern toolset. 2019-04-16 16:20:51 +01:00
jean-pierre charras a07caac85a Pcbnew, Netlist inspector: fixes and enhancements. 2019-04-15 10:10:51 +02:00
Jeff Young ef3f773f84 Code formatting cleanup. 2019-04-14 23:13:46 +01:00
Jeff Young d5f136cd7e Polish export-related changes to List Nets Dialog. 2019-04-14 22:29:52 +01:00
Andrey Fedorushkov dacab4abe0 pcbnew: add tracks length and export netlist to file in netlist inspector 2019-04-14 20:39:29 +01:00
Jon Evans 1d2db311b2 Set new module parent early enough to allow pad clearance to be shown
Fixes: lp:1824587
* https://bugs.launchpad.net/kicad/+bug/1824587
2019-04-14 14:25:38 -04:00
Jeff Young b63fab92cf Move Eeschema net highlighting to modern toolset. 2019-04-14 12:10:48 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young fc7f5630c7 Move eeschema zoom operations to modern toolset. 2019-04-13 18:43:26 +01:00
Jon Evans dec5d80180 Veto mouse warping from DRC dialog
Fixes: lp:1824630
* https://bugs.launchpad.net/kicad/+bug/1824630
2019-04-13 11:23:57 -04:00
jean-pierre charras 2529346940 Some fixes for I18N. Mainly do not translate debug messages or strings giving only a print format (like "%d"). 2019-04-13 10:12:24 +02:00
Jeff Young dae41b7460 Remove legacy segment-based zones.
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.

Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
2019-04-12 20:19:23 +01:00
John Beard ab2281d26f GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
2019-04-12 16:08:11 +01:00
Jon Evans 3d9b5daf9c Improve selection behavior of DRC markers in DRC dialog list
Fixes: lp:1813373
* https://bugs.launchpad.net/kicad/+bug/1813373
2019-04-12 11:01:38 -04:00
jean-pierre charras c162ff9076 Curved airwires: set the default to straight lines (i.e. the legacy behavior)
Add also missing comments.
2019-04-12 14:17:55 +02:00
Jon Evans 69a66fc826 Fix polarity of curved ratlines button 2019-04-11 21:49:45 -04:00
Jeff Young 0021ecf51e Don't double-escape netnames.
Netnames in wxChoice or wxListBox are already in internal format
and don't need escaping again.

Fixes: lp:1823863
* https://bugs.launchpad.net/kicad/+bug/1823863
2019-04-12 00:28:58 +01:00
Jeff Young 76e0622222 Redraw and Position Relative can't share the same hotkey. 2019-04-12 00:28:58 +01:00
Jeff Young 8ae0579436 Reorder global edit dialogs for better comprehension.
Fixes: lp:1818087
* https://bugs.launchpad.net/kicad/+bug/1818087
2019-04-12 00:28:58 +01:00
MaPePeR e7d32c54b9 pcbnew: Draw Ratsnest with arcs to avoid overlap
Adds a toggle button that allows switching between straight lines and
curves for the ratsnest lines.

Fixes: lp:1766597
* https://bugs.launchpad.net/kicad/+bug/1766597
2019-04-12 00:28:58 +01:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00
John Beard 17e88d0944 Pcbnew: FOOTPRINT_PREVIEW_PANEL passes reference to local
Previously, the GAL_DISPLAY_OPTIONS object in FOOTPRINT_PREVIEW_PANEL::New
was passed by reference in the ctor, down to EDA_DRAW_PANEL_GAL, which stored
it as a reference. The object in New() then goes out of scope, so the
referencing panel outlives the options.

Fix this by making a copy in a std::unique_ptr of the options, and giving
ownership to the panel.

There is another issue here: when the Pcbnew options are copies, the
OBSERVABLE subscriber list is copied too. This means if the panel called
NotifyChanged() on the options, Pcbnew would get updates, even though a copy
of the options changed. However, the panel doesn't change the options or
notify, so it's OK for now.
2019-04-11 17:01:23 +01:00
jean-pierre charras 0fae86b1ba Pcbnew: suppress incorrect wx alert when opening the plot dialog from File/Plot menu 2019-04-11 17:36:51 +02:00
Jeff Young 2144c6c97d Save a bit of space in the copper zone dialog. 2019-04-10 18:12:14 +01:00
jean-pierre charras aa53b5508e Zone filler: fix missing calculation of filled polygons when fill mode is ZFM::SEGMENTS 2019-04-10 17:49:40 +02:00
Seth Hillbrand 7cf394e34f pcbnew: Handle missing footprint wizards
When we do not have any footprint wizards to display, we cannot select
the grid rows.

Fixes: lp:1823608
* https://bugs.launchpad.net/kicad/+bug/1823608
2019-04-09 11:54:01 -07:00
Wayne Stambaugh f056777e6a Pcbnew: fix Hyperlynx export reporting string formatting. 2019-04-09 13:56:36 -04:00
jean-pierre charras 37ae0bf809 Pcbnew: fix a serious issue in ZONE_FILLER. 2019-04-09 11:38:18 +02:00
jean-pierre charras 0b33df8831 Pcbnew,DIALOG_SELECT_NET_FROM_LIST: fix a crash and the not working net selection.
It was due to changes in code, and related to escaping the '/' in net labels.
2019-04-08 15:36:55 +02:00
John Beard 124dd5e59a 3D viewer: use hi-DPI settings for canvases
The 3D viewer also uses OpenGL, so it also needs to
adjust based on DPI scale factors.

This patch moves the 3D viewer common config code solely
within the 3D viewer, and adds handling of the DPI scale. This
also avoids duplicated logic in PCB_BASE_FRAME::CommonSettingsChanged.

For now, as EDA_3D_VIEWER is not included in the Kiway settings
dispatch, still manually invoke the settings update from
PCB_BASE_FRAME.

The PANEL_3D_PREV gets a similar function to read the config, but
it doesn't have a listener for the update, so it's set just once
at dialog init, just like the existing pan settings.

Fixes: lp:1823681
* https://bugs.launchpad.net/kicad/+bug/1823681
2019-04-08 14:29:15 +01:00
Jeff Young d361e68d0e Condense the DRC dialog a bit.
The messages title doesn't really provide useful info anyway.
2019-04-08 13:26:26 +01:00
Jeff Young a1c162e59f Reimplement footprint checking on top of DRC architecture.
This allows Import Netlist and Update PCB from Schematic to
share the same checking code, and expose it through the DRC
dialog.

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

Fixes: lp:1809293
* https://bugs.launchpad.net/kicad/+bug/1809293
2019-04-08 13:26:17 +01:00
Jeff Young 77f15eeeaf Support synchronous messaging over KIWAY EXPRESS.
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.

This is also a prelude to adding support for footprint testing
without a netlist.
2019-04-08 13:26:09 +01:00
Jeff Young 52e3a1d7c4 Trim zone fills to board outline.
Fixes: lp:1820306
* https://bugs.launchpad.net/kicad/+bug/1820306
2019-04-08 13:10:29 +01:00
Seth Hillbrand cf63ae7ae2 pcbnew: Show clearance when editing tracks
When requested by display options, we should show the track clearance
when dragging tracks.

Fixes: lp:1818343
* https://bugs.launchpad.net/kicad/+bug/1818343
2019-04-07 21:25:28 -07:00
Seth Hillbrand c8118e3ce4 pcbnew: Allow click+drag of tracks
This behavior existed in 5.0.x but did not properly exit the edit tool
in 5.1.  This removes stops the edit tool when we begin dragging a track
using the interactive router.

Fixes: lp:1820312
* https://bugs.launchpad.net/kicad/+bug/1820312
2019-04-07 20:59:06 -07:00
Tomasz Włostowski e5753b79d4 pcbnew: Hyperlynx Exporter - initial version 2019-04-08 02:56:02 +02:00
Jeff Young a81512ca96 Adjust justified text for rotation.
Fixes: lp:1823090
* https://bugs.launchpad.net/kicad/+bug/1823090
2019-04-07 22:17:59 +01:00
Michael Kavanagh 27e6f5b9e8 Change "Switch track width to previous" default hotkey from Ctrl+W to Shift+W
Tiny improvement in consistency.

Fixes lp:1785842
https://bugs.launchpad.net/kicad/+bug/1785842
2019-04-07 10:50:59 -07:00
Seth Hillbrand a300ae105d pcbnew: Freeze the netclasses dialog on init
Prevents the size events from firing on Mac when we set up the netclass
panel

Fixes: lp:1819426
* https://bugs.launchpad.net/kicad/+bug/1819426
2019-04-07 07:07:55 -07:00
Seth Hillbrand 24bf838392 pcbnew: Allow arc editing via midpoint
This permits changing the radius of the arc by adjusting the center
point of the arc.  The arc end points are fixed in this operation.
2019-04-07 06:50:25 -07:00
Jeff Young 4a9f82109a Uniformly quote strings which may have user content.
Fixes: lp:1655193
* https://bugs.launchpad.net/kicad/+bug/1655193
2019-04-07 00:24:10 +01:00
Jeff Young 684bb62fd8 Escape slashes in labels and netnames.
Also re-allows spaces, as they can already come in through sheet
names.

Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Jeff Young 97063440bb Adjust left- or right-justified text for mirroring. 2019-04-07 00:24:10 +01:00
Jeff Young 1ae47b6069 Implement a copper-to-edge-clearance setting.
For legacy boards, the setting is picked up from the board outline
thickness.  If the board outline has mixed thicknesses, then the
max is used and a warning is displayed.

Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2019-04-05 22:18:44 +01:00
Wayne Stambaugh b6a0bf1142 Minor drill file dialog improvements. 2019-04-05 16:49:08 -04:00
Wayne Stambaugh dfee7bddd3 Minor footprint position dialog improvements. 2019-04-05 16:15:16 -04:00
Jeff Young 87f303319c Implement a dry run for Cleanup Tracks and Vias.
Uses the DRC architecture to support inspection of the changes to
be made (right click on items, hover over them in the menu to
highlight them on the board).

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

Fixes: lp:1809474
* https://bugs.launchpad.net/kicad/+bug/1809474
2019-04-05 18:52:51 +01:00
Jeff Young e563184eac Add Gerbers to Fabrication Outputs menu.
Fixes: lp:1817124
* https://bugs.launchpad.net/kicad/+bug/1817124
2019-04-05 16:12:45 +01:00
Jeff Young ea43866563 Move legacy netlist read/write to import/export.
Fixes: lp:1610529
* https://bugs.launchpad.net/kicad/+bug/1610529
2019-04-05 16:11:15 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
jean-pierre charras 0aa8458d04 DIALOG_PAD_PROPERTIES: Fix incorrect calculation of Round Rect Radius Ratio, when inches are selected.
Fixes: lp:1822720
https://bugs.launchpad.net/kicad/+bug/1822720
2019-04-04 15:40:29 +02:00
jean-pierre charras de4b2dea77 Pcbnew: DIALOG_IMPORT_GFX_BASE: fix a minor wxWidgets alert. 2019-04-04 13:46:09 +02:00
Seth Hillbrand ce254d1061 pcbnew: Allow Missing legacy option
LEGACY is disabled for GTK3, so we may not find the menu item

Fixes: lp:1822877
* https://bugs.launchpad.net/kicad/+bug/1822877
2019-04-03 15:54:54 -07:00
Jon Evans a6a6785316 Fix a wxString reference warning 2019-04-03 16:28:23 -04:00
Jeff Young d8cc2f8280 More cleanup from non-reference return from GetText(). 2019-04-03 19:35:25 +01:00
Jeff Young d90d0780ae Fix some fall-out from the non-reference GetText(). 2019-04-03 19:14:45 +01:00
Jeff Young 77284e82c8 Replace switch-to-non-copper-layer for DIMENSION and POLYGON.
These still aren't handled by DRC.

Fixes: lp:1796500
* https://bugs.launchpad.net/kicad/+bug/1796500
2019-04-03 19:14:45 +01:00
Wayne Stambaugh 75366bce74 Remove debugging code added in commit d2cb0ca7. 2019-04-03 12:19:50 -04:00
Wayne Stambaugh 120ab06db4 Pcbnew: fix DXF import line width bug.
There is a circular dependency between the GRAPHICS_IMPORTER object and
the GRAPHICS_IMPORT_PLUGIN object which makes sharing the settings in
the GRAPHICS_IMPORTER unwieldy.  This fix is a ugly hack that resolves
the issue.  The underlying issue will require some major refactoring.

Fixes lp:1821234

https://bugs.launchpad.net/kicad/+bug/1821234
2019-04-03 11:29:17 -04:00
Wayne Stambaugh d2cb0ca75f Pcbnew: fix import graphics dialog issues.
Improve padding, spacing and alignment of dialog layout.

Fix title capitalization.

Make file dialog wildcard string translatable.

Remove fixed initial dialog size to allow sizers to work their magic.

Replace OK button event handler with TransferDataFromWindow.

Remember last line width units between dialog instances and sessions.

Save configuration file settings in a separate group and remove GfxImport
prefix from the entry names.

Add fencing to dialog header file to prevent nested includes.

Fixes lp:1822568

https://bugs.launchpad.net/kicad/+bug/1822568
2019-04-03 09:57:31 -04:00
Jeff Young 920d9e3d46 Don't switch to non-copper layer when drawing text & graphics.
We now allow these items on copper layers (and do the necessary
DRC, etc.)

Fixes: lp:1796500
* https://bugs.launchpad.net/kicad/+bug/1796500
2019-04-03 10:18:11 +01:00
Jeff Young ca25f352ce Make Footprint Editor save command context-sensitive.
Fixes: lp:1795961
* https://bugs.launchpad.net/kicad/+bug/1795961
2019-04-03 10:18:11 +01:00
Seth Hillbrand 7ee12d674e pcbnew: Clear items before deleting vertex
Reverting changes causes the item to become invalid.  This can cause
issues when we have dangling pointers for the VIEW routines left over.
Until we implement a method of passing the reverted element back up to
the calling routine, we need to remove the selection for each Revert()
call.

Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909
2019-04-02 13:15:10 -07:00
Michael Kavanagh b0674b8802 Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,
2019-04-02 12:57:27 -04:00
Seth Hillbrand 940aef77af pcbnew: Update points before refresh
When removing a point from the polygon, the vertex is removed before it
is tested for validity.  If it fails validation, the edit is reverted
and the point count doesn't change, so the view update only modifies the
existing points.  But the revert may also have changed the shared
pointer to the point array, invalidating the view's copy.

Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909
2019-04-02 09:55:28 -07:00
Seth Hillbrand 32e82f8d87 Include zone include for zone_settings.cpp 2019-04-02 09:55:28 -07:00
jean-pierre charras abc605fcfa fix a compil warning.
Fix a few comments.
2019-04-02 09:05:42 +02:00
Seth Hillbrand 428e7a900b pcbnew: Prevent aux axis after-image
Grid helper in the router tool is persistent, so remember to turn off
the aux axes after setting.

Fixes: lp:1822577
* https://bugs.launchpad.net/kicad/+bug/1822577
2019-04-01 14:23:46 -07:00
Seth Hillbrand 6f4d1345f3 pcbnew: Handle old stable translated layers
This inserts a translation map in the layer names so that the old stable
files with Italian/French layer names get updated to the standard
English layer names (instead of not opening).

Fixes: lp:1370575
* https://bugs.launchpad.net/kicad/+bug/1370575
2019-04-01 13:54:25 -07:00
Seth Hillbrand 5eb2a33498 pcbnew: Ensure DRC circles have at least 4 points
This prevents invalid outline errors for small circles.

Fixes: lp:1822641
* https://bugs.launchpad.net/kicad/+bug/1822641
2019-04-01 11:47:58 -07:00
Jeff Young 33e594e63e Update description when tree item is in editor.
Fixes: lp:1820298
* https://bugs.launchpad.net/kicad/+bug/1820298
2019-04-01 13:23:37 +01:00
Jeff Young a8b8c73ab8 Set initial focus to track width / via size.
Fixes: lp:1822177
* https://bugs.launchpad.net/kicad/+bug/1822177
2019-04-01 13:23:37 +01:00
Jeff Young 8b2b06c926 Allow save after importing footprint.
Fixes: lp:1819777
* https://bugs.launchpad.net/kicad/+bug/1819777
2019-04-01 13:23:37 +01:00
Jeff Young 3da5396c8d Fixes for importing board setup properties.
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).

Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
2019-04-01 13:23:37 +01:00
jean-pierre charras 9d97c053b4 Pcbnew: Graphic polygon items are now drawn in sketch mode when the sketch mode is selected. 2019-04-01 12:50:47 +02:00
Jon Evans 4d10183e78 Try harder to reassign copper zones on netlist import 2019-03-31 19:56:28 -04:00
Michael Kavanagh a611269975 Read Footprint Library Browser grid settings from Footprint Editor.
Implements commit 3a0dbf48c8 for Footprint Library Browser/Editor.

Fixes: lp:1822401
https://bugs.launchpad.net/kicad/+bug/1822401
2019-03-31 07:00:45 -07:00
jean-pierre charras d29ee13fda Due to new features (hatched zones, chamfered round rect pads) set SEXPR_BOARD_FILE_VERSION to 20190331 2019-03-31 08:46:36 +02:00
jean-pierre charras 7170720f3c Allow hatch pattern in filled zones
the filled areas can use a hatch pattern (crossing lines) using square holes.
The zone filler removes too small holes (truncated holes) from hatch pattern.
It avoid to create small holes when a hole pattern is truncated by the filled area base shape.
2019-03-31 08:21:40 +02:00
John Beard d6b8e9e037 Pcbnew: Improve tab traversal in text properties dialog
Tab through the grid vertically, then horizontally, as the fields
are laid out with "related" fields (like the co-ords) vertically.

Also neaten headers.

Fixes: lp:1821887
* https://bugs.launchpad.net/kicad/+bug/1821887
2019-03-27 13:56:03 +00:00
John Beard b7017167f0 Pcbnew: Align right margins in text properties dialog 2019-03-27 13:56:03 +00:00
John Beard dd3252445d Pcbnew: update text properties dialog wxFB version
No actual changes, but this keeps the diffs clean(er).
2019-03-27 13:56:03 +00:00
Michael Kavanagh bbcea3c98d Fix mnemonic typo in pcbnew menubar 2019-03-26 19:10:01 -04:00
jean-pierre charras fdfe5eabfb Fix incorrect detection of filled zones changes in DRC check.
Commit 6006703798 fixed a crash but broke the filled zones changes detection.
Filled zones were always seen as not up to date due to the fact the filled areas were cleared too early.

The up to date detection is also optimized: the old filled polygons are no longer stored.
Instead of, the MD5_HASH is calculated and stored before clearing the filled polygons.
2019-03-21 15:27:05 +01:00
jean-pierre charras 7c04b3dbeb Drc dialog: make track to copper zones test optional, because it can be really very time consuming 2019-03-19 18:18:20 +01:00