Commit Graph

7793 Commits

Author SHA1 Message Date
Seth Hillbrand b244a940ef pcbnew: Fix crash in modedit saving 2019-06-01 19:44:29 -07:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Jon Evans f49779465e Fix broken build in array_creator 2019-06-01 16:30:58 -04:00
Seth Hillbrand 3fb8963536 pcbnew: Cleanup tracks and vias rework
Fixes a few commit issues based on the std:: rework.  Add an option to
delete tracks fully in pads and makes merge tracks smarter

Fixes: lp:1787190
* https://bugs.launchpad.net/kicad/+bug/1787190
2019-06-01 09:53:23 -07:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand 961b22d603 pcbnew: Changing drawings from dlist to std::deque 2019-06-01 09:51:57 -07:00
Jeff Young 296ec66796 Cosmetic cleanup in preference panels. 2019-06-01 16:29:12 +01:00
Jeff Young 74e10791ff Fix some Mac-specific issues with the Preferences... menu item. 2019-06-01 16:29:12 +01:00
Jeff Young f67df4bf11 Collapse ARRAY_CREATOR into single class now that legacy instance is gone.
Also removes AllowLegacyCanvas ADVANCED_CONFIG option.
2019-06-01 16:29:12 +01:00
Jeff Young c1298570cb Remove legacy routing options. 2019-06-01 16:29:12 +01:00
Jeff Young 69e60d3982 Make sure grid settings get set in new canvas when switching. 2019-06-01 01:57:24 +01:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
Jeff Young ed9153a786 Fix assert launching PCBNew. 2019-06-01 00:06:25 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young edc8438ef0 Start the process of removing the legacy draw panel. 2019-05-31 21:54:21 +01:00
jean-pierre charras 30ad8e9369 Pcbnew, file menu: fix missing initialization of Append Board menuitem 2019-05-31 18:28:31 +02:00
Jon Evans d0926cce58 PcbNew: prevent crash in point editor if selection gets invalidated 2019-05-29 21:27:59 -04:00
Seth Hillbrand eb0fc7bae2 Re-connect switch canvas on startup 2019-05-29 15:29:36 -07:00
Seth Hillbrand 218bea9ace pcbnew: Fix crash in find dialog
Tool manager is not exposed to the dialogs, we need to reference it
through the parent frame.

Fixes: lp:1830942
* https://bugs.launchpad.net/kicad/+bug/1830942
2019-05-29 15:05:38 -07:00
jean-pierre charras 48899a4c96 Fix incorrect tooltip. 2019-05-29 21:33:05 +02:00
Seth Hillbrand e7e20b85b5 Don't change the board without user action
Grid and ratsnest visibility are stored in the board file and should not
be changed without the user explicitly modifying them.

In the future, we'll move these settings out of the board file but we
shouldn't cause extra file-churn for flipped bits.

Fixes: lp:1828285
* https://bugs.launchpad.net/kicad/+bug/1828285
2019-05-29 11:25:44 -07:00
Jon Evans 4d8be7b2bb PcbNew: ensure Bezier points are updated before plotting 2019-05-29 00:17:34 -04:00
Jon Evans adfc4d2485 PcbNew: fix Bezier curves not having bounding boxes at startup 2019-05-29 00:17:34 -04:00
Seth Hillbrand cdaba24f0d pcbnew: Remove some legacy code
The menu IDs were used for disambiguation in legacy canvas.
2019-05-28 20:33:17 -07:00
Seth Hillbrand 453eb9c3eb pcbnew: Reconnect Grid settings dialog
Connects using the new common grid settings ID
2019-05-28 20:32:40 -07:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young 9d29e94cb5 Remove some more legacy code. 2019-05-29 00:26:29 +01:00
Jeff Young 0260b32125 Push resetLocalCoords down into COMMON_TOOLS.
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young a27e4246e0 Move some more menu commands to ACTIONs. 2019-05-29 00:26:29 +01:00
Jeff Young c0909611d3 Remove a bunch more legacy editing code. 2019-05-29 00:26:29 +01:00
Seth Hillbrand f59a2410fa pcbnew: Check netlist settings in proper spot
We have _two_ settings that independently control whether the netlist is
updated by timestamp.  One in the NETLIST object and one in the
NETLIST_UPDATER object.  It looks like we are phasing one out but the
commit was not complete.

Fixes: lp:1828754
* https://bugs.launchpad.net/kicad/+bug/1828754
2019-05-28 14:21:25 -07:00
Seth Hillbrand 10b0b18d80 netlist: Update via netnames
Vias may need to have their netnames updated because floating vias do
not get a connectivity push.

Fixes: lp:1830102
* https://bugs.launchpad.net/kicad/+bug/1830102
2019-05-28 12:14:42 -07:00
Michael Kavanagh 27d097a78c Stop PNS router settings from being overwritten when switching modes
Fixes: lp:1824967
* https://bugs.launchpad.net/kicad/+bug/1824967
2019-05-27 16:10:00 -07:00
Jeff Young 50d2aaa97c Fix copy/paste typos in undo/redo. 2019-05-27 22:17:22 +01:00
Jeff Young ce4c4c9409 Fix crash in PCBNew undo from uninitialized variable. 2019-05-27 18:58:36 +01:00
Jeff Young 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47:20 +01:00
Jon Evans 3625668ff5 PcbNew: Fix ordering of fab and courtyard layers
Fixes: lp:1829511
* https://bugs.launchpad.net/kicad/+bug/1829511

(cherry picked from commit eb4aded5d6)
2019-05-27 13:06:26 -04:00
Jon Evans cfe588a853 Prevent unbalanced PTH pad labels from being hidden by drills
Fixes: lp:1829067
* https://bugs.launchpad.net/kicad/+bug/1829067

(cherry picked from commit 5230f45658)
2019-05-27 13:06:26 -04:00
Jeff Young d24a2afaca Fix duplicate to work like paste to keep pins from getting duplicated.
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.

Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
2019-05-27 11:58:56 +01:00
Jeff Young e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Jeff Young 2502bce987 Move quit back to wxIDs. wxWidgets like to muck around with the location on OSX. 2019-05-27 11:58:55 +01:00
Jeff Young 6936effaa7 Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Jeff Young bdd44ce88c Use consistent PageLayout data structure names. 2019-05-27 11:55:58 +01:00
Jon Evans 638ac3838c PcbNew: Fix layer alpha overrides being overwritten by color changes
Fixes: lp:1827518
* https://bugs.launchpad.net/kicad/+bug/1827518

(cherry picked from commit cb3edf2607)
2019-05-26 20:20:53 -04:00
Jon Evans e156e4509c Report actual intersection position for crossing tracks
Fixes: lp:1825588
* https://bugs.launchpad.net/kicad/+bug/1825588

(cherry picked from commit f101934909)
2019-05-26 13:03:23 -04:00
Jon Evans 549b76739e Exclude invisible items from view bounding box for zoom-to-fit
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457

(cherry picked from commit ede2575018)
2019-05-26 13:03:23 -04:00
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Seth Hillbrand 0a668ee550 pcbnew: Remove segment count from board file
This removes the setting for number of segments per circle from the zone
definition.  All segment counts are handled by absolute error allowed.
2019-05-24 21:13:53 -07:00
Jon Evans 52a9e68093 Store items changed by connectivity algorithm in undo list
Fixes: lp:1828442
* https://bugs.launchpad.net/kicad/+bug/1828442

(cherry picked from commit fb80ee5a0e)
2019-05-24 21:56:37 -04:00
Michael Kavanagh 741140e4a4 Fix footprint marked as modified when layer visibility changed
Fixes: lp:1830330
* https://bugs.launchpad.net/kicad/+bug/1830330
2019-05-24 16:13:22 -04:00
Seth Hillbrand 7058b79bf1 pcbnew: Fix assert in debug build
Previously we saved the visibility as a mask of 32bits and the check was
needed.  These are now saved as per-layer setting, so the assert is
extra.
2019-05-24 12:39:01 -07:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Wayne Stambaugh 816f6db310 Pcbnew: Python scripting support clean up.
Always check the return value of PyRun_SimpleString() for errors when a
Python script is run and show an error message rather than fail silently.

Enable Python interpreter I/O redirection in debug builds so that script
string errors will be shown when PyRun_SimpleString() is called.

Do not call PyErr_Print() after a PyRun_SimpleString() call failure.  It
doesn't do anything useful.

Do not call Py_Finalize() after a PyRun_SimpleString() call failure.  It
seems to cause Pcbnew to crash.
2019-05-24 07:32:38 -04:00
jean-pierre charras ce93934f08 Pcbnew, ZONE_FILLER: fix incorrect test to remove filled areas outside the board edge cuts.
This incorrect test was only for zones with no net.
2019-05-23 20:22:03 +02:00
Ian McInerney 0daf14f9c3 pcbnew: Fixed listing of 3D libraries in the github wizard
Fixes: lp:1830137
* https://bugs.launchpad.net/kicad/+bug/1830137
2019-05-23 09:50:05 -07:00
jean-pierre charras 75cea18f07 Pcbnew, toolbars: fix incorrect icons 2019-05-23 11:07:55 +02:00
Seth Hillbrand ac435ecd68 Moving further arc approximations down
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
2019-05-22 14:35:17 -07:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Michael Kavanagh 07b82d19e3 Allow setting cursor and aux items colour in footprint editor
Fixes: lp:1829850
* https://bugs.launchpad.net/kicad/+bug/1829850
2019-05-22 15:46:15 -04:00
jean-pierre charras 459a972116 Remove unused vars. 2019-05-22 08:27:48 +02:00
Seth Hillbrand 6f7475dcd3 pcbnew: Prevent no-connects from driving clusters
The no-connect net (0) should never drive the net of a cluster.
Otherwise, tracks connecting between unconnected pads and connected pads
can acquire net 0 incorrectly.
2019-05-21 19:29:29 -07:00
Seth Hillbrand 1181b9f9b4 EAGLE: Correct pcb text orientation
Fixes: lp:1829711
* https://bugs.launchpad.net/kicad/+bug/1829711
2019-05-21 14:04:03 -07:00
Seth Hillbrand a62a89eac3 EAGLE: Prevent numeric-only component references
KiCad does not allow references to be numeric only.  This prefixes such
references with "UNK" to note that the reference designator type is
unknown.
2019-05-21 13:49:18 -07:00
Seth Hillbrand 490c805319 Allow squared inflation and inflate Eagle Zones
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.

This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline.  KiCad zones are drawn inside the polygon.  We need to both
increase the zone size and decrease the minimum pen width to account for
this.

Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
2019-05-21 13:49:18 -07:00
Seth Hillbrand bf0a466642 pcbnew: Allow adding SHAPE_LINE_CHAIN to zones 2019-05-21 13:49:18 -07:00
Seth Hillbrand c80e3e0ffc eagle: Use width on imported lines if available
If not, use the current board design settings for line thickness based
on the board layer.
2019-05-21 13:49:17 -07:00
jean-pierre charras d3dc7ade8a menubar_pcb_editor.cpp: minor code refactor. 2019-05-21 14:24:08 +02:00
jean-pierre charras 6e6063b258 Pcbnew: release the lock file if a board was loaded, and when clearing the board currently edited.
When the board is cleared, the previous loaded board is no longer in edit.
2019-05-20 18:36:24 +02:00
Seth Hillbrand dbc40096db eagle: Use the "first" tag instead of pin num
Eagle parsing allows pin 1 to be different from the other pins in the
package but this is set by a tag marking the pin as "first" rather than
the actual number of the pin.

Fixes: lp:1829251
* https://bugs.launchpad.net/kicad/+bug/1829251
2019-05-20 06:02:15 -07:00
jean-pierre charras 4ac20d7ab1 menubar_pcb_editor.cpp: add missing icons. 2019-05-20 10:05:33 +02:00
jean-pierre charras 5137b54bd8 Pcbnew: fix a (minor) lock file issue: the lock was too early set.
If the file was (for some reason) not actually loaded, it was locked.
Now, the file is locked only if it is actually loaded.
2019-05-19 11:03:44 +02:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +01:00
Jeff Young b90b454ada Remove legacy block operations. 2019-05-18 00:21:49 +01:00
Jeff Young 1a3d0492f5 Push polar coords down into COMMON_TOOLS. 2019-05-18 00:21:49 +01:00
Seth Hillbrand f32c95229e pcbnew: Check for valid data before deleting
We need to check for valid rows and iterators before removing a 3d model

Fixes: lp:1829337
* https://bugs.launchpad.net/kicad/+bug/1829337
2019-05-17 09:34:27 -07:00
Wayne Stambaugh 97166a72f5 Pcbnew: fix bug in Eagle footprint plugin.
Some how a board object was required to fetch the line width when a
footprint is being parsed.  The problem is that there is no board
defined when loading Eagle footprint libraries so there was a nullptr
segfault as a result.  When there is no board defined, use the default
KiCad layer line widths.

Fixes lp:1829243

https://bugs.launchpad.net/kicad/+bug/1829243
2019-05-17 08:38:03 -04:00
Jeff Young 97445f1714 Don't go into interactive move when position was set in creation dialog.
Fixes: lp:1822569
* https://bugs.launchpad.net/kicad/+bug/1822569
2019-05-16 19:57:06 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Seth Hillbrand ddc6079ceb Move remaining hard-coded segment counts
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
2019-05-16 08:49:55 -07:00
John Beard 0eb8f92c69 Pcbnew: add a step field to the array tool
This is useful, for example, when arraying only one side
of a connector.

Fixes: lp:1809580
* https://bugs.launchpad.net/kicad/+bug/1809580
2019-05-16 11:20:52 +01:00
John Beard eb1e67583f Pcbnew: tidy up array options access/allocation
Use unique_ptrs for ownership transfer.

Pass the target object to the constructor rather than
creating an internal verison.
2019-05-16 11:20:52 +01:00
John Beard 6ade8c25e1 Pcbnew: allow alphabetic numbering in n circular grids
Add controls to the dialog and wire up to the axis numbering
scheme, same as the grid axes.

Fixes: lp:1814923
* https://bugs.launchpad.net/kicad/+bug/1814923
2019-05-16 11:20:52 +01:00
John Beard f47e2b54f8 Decouple the array tool list box from the numbering enum
This prevents the dialog being sensitive to the exact ordering
of the enum, and instead defines an explicit mapping between
the axis numbering type, the label string and the position in the
list box control.
2019-05-16 11:20:52 +01:00
John Beard 2c1b970027 Arrays: isolate axis code in a new class
Remove the axis numbering code from ARRAY_OPTIONS
and place in a new class, ARRAY_AXIS. This keeps
the logic for the array item numbering separate from
the logic for the array item geometry.

This simplifies the logic in the ARRAY_OPTIONS class, which
no longer has to deal with the numbering of each axis.
2019-05-16 11:20:52 +01:00
Seth Hillbrand 44e111b37e pcbnew: Add remaining Eagle pad types
This adds octagon and offset pad types to the Eagle pcb importer.

Fixes: lp:1814498
* https://bugs.launchpad.net/kicad/+bug/1814498
2019-05-15 11:12:16 -07:00
Seth Hillbrand b3b5ffe799 pcbnew: fixup small type issue 2019-05-15 09:53:42 -07:00
Jeff Young 69afa27a5f Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset.  It also reduces a whole bunch of duplicated
data.
2019-05-15 17:50:52 +01:00
Jeff Young f9e4ee1fc9 CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.) 2019-05-15 17:50:52 +01:00
Jeff Young eb3a201d39 Move some PCBNew and GerbView actions to their COMMON equivalents. 2019-05-15 17:50:52 +01:00
Wayne Stambaugh a32bb4e9a5 Pcbnew: fix crash when deleting DRC errors from DRC dialog.
Fixes lp:1828726

https://bugs.launchpad.net/kicad/+bug/1828726
2019-05-14 18:07:34 -04:00
Wayne Stambaugh 6f27ef7f66 Fix library table editor dialog environment variable grid column names.
Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1828459
2019-05-14 07:57:58 -04:00
Jeff Young ef5c69167a Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.

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

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

Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +01:00
Wayne Stambaugh 3c4f8c1bf7 Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
2019-05-13 15:40:44 -04:00
jean-pierre charras 92ccb766ab Python fp wizards: fix a few issues in qrcode_footprint_wizard.py
Fixes: lp:1828744
https://bugs.launchpad.net/kicad/+bug/1828744
2019-05-13 13:04:57 +02:00
jean-pierre charras 51bfec8ef9 Footprint viewer: fix a crash when clicking the "Insert footprint in board" tool when no footprint selected 2019-05-12 17:07:23 +02:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Martin McNamara 7200f4d7b5 PCBnew: Fixes crosshair issue with "Place Text" and "Add Dimension".
When using "Place Text" the crosshair was freezing if cancelled before
placing text.

After the crosshair freezes, the next uses of the "Place Text" or
"Add Dimension" caused the crosshair to jump to the screen location
where the previously the crosshair was frozen.

Cancelling the "Add Dimension" caused the crosshair to jump to the
screen location where the crosshair was when cancelled on the next use
of the "Place Text" or "Add Dimension".

Fixes: lp:1822578
* https://bugs.launchpad.net/kicad/+bug/1822578
2019-05-11 06:44:40 -07:00
Jeff Young b83dac68d0 Fix drag-select hit-testing of LibEdit items. 2019-05-10 23:24:27 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Michael Kavanagh a3483f44d2 Add Save As hotkey to footprint editor
Fixes: lp:1828481
* https://bugs.launchpad.net/kicad/+bug/1828481
2019-05-10 15:12:39 +01:00
jean-pierre charras 5f4a6e33a0 Custom pads: minor fix in legacy mode related to commit a155289f. 2019-05-09 16:45:25 +02:00
jean-pierre charras a155289f70 Custom pads: fix incorrect shape of masks when the shape is a polygon with holes and the mask margin is < 0.
This is mainly the solder paste layer that shows this issue.
This is due to the fact SHAPE_POLY_SET::Inflate does not work fine with polygons with linked holes.
SHAPE_POLY_SET::InflateWithLinkedHoles it added to fix this issue.

Fixes: lp:1828287
https://bugs.launchpad.net/kicad/+bug/1828287
2019-05-09 16:23:18 +02:00
Seth Hillbrand f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
Seth Hillbrand b56ca3f09c Staging wxFormBuilder change for next commit 2019-05-08 15:54:26 -07:00
John Beard 2c71d550ab Icons: Add 'import vector' icon
This distinguishes vector graphics import from other imports
(when icons in menus are enabled).

Previously, it was a generic import icon.
2019-05-07 12:08:48 +01:00
Jeff Young cd2bd23c37 Fix a bunch of issues with hotkeys, IDs and event processing.
Fixes: lp:1827894
* https://bugs.launchpad.net/kicad/+bug/1827894
2019-05-06 21:42:00 +01:00
Jeff Young a12d769074 Code clarification and commenting.
Also renames toolbar files to reduce confusion with the modern toolset
tool files.
2019-05-06 15:31:23 +01:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young ed0e6af66d Move to direct tool registration.
It was confusing that the primary frames registered their tools
differently than the other frames.  In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)
2019-05-05 17:14:30 +01:00
Jeff Young f81007f74b Some clean-up and moving message panel update to selection event. 2019-05-05 17:12:59 +01:00
Jeff Young 902be18a04 More modern toolset context menu work.
Text/label type changes and bus entry shape changes.  And some
context menu bug fixing.
2019-05-05 17:12:59 +01:00
Jeff Young b526461a8e Fix colliding hotkeys issue.
All grid commands need to be shared now as they're implemented
by a common tool.
2019-05-05 17:12:59 +01:00
Jeff Young 42383ae871 Build out some of the modern toolkit context menus. 2019-05-05 17:12:59 +01:00
Jeff Young 4e0208dfba Move duplicate item and block to modern toolset. 2019-05-05 17:12:59 +01:00
Jon Evans 722edda83c Make it easier to select footprints that overlap pads on opposite side 2019-05-04 22:59:56 -04:00
Jon Evans e0ada1379f Allow clearing PcbNew highlight through cross-probing
Fixes: lp:1821486
* https://bugs.launchpad.net/kicad/+bug/1821486
2019-05-04 16:18:51 -04:00
Andrei Pozolotin 3e4913adce Pcbnew export/import scripting functions.
Discussion can be found at
https://forum.kicad.info/t/pcbnew-export-import-scripting-functions/16343

Fixes lp:1824668

https://bugs.launchpad.net/kicad/+bug/1824668
2019-05-04 09:55:25 -04:00
Ian McInerney 9e6e9d0910 Replace remaining Boost mutexs with std::mutex
CHANGED: Replaced all MUTEX types with std::mutex
         Replaced all MUTLOCK types with std::lock_guard
2019-05-03 17:13:20 -07:00
Michael Kavanagh 2a09664ebc Clean up import and export menus
Fixes: lp:1822907
* https://bugs.launchpad.net/kicad/+bug/1822907
2019-05-02 12:25:59 -04:00
jean-pierre charras 4e5a94efb7 Pcbnew, non copper zones: fix 2 issues.
1 - For debug purposes, the code to fill non copper zones was disabled and the copper zone code was uses instead.
It creates issues with pad clearance areas, because a non copper zone has no clearance areas.
2 - The non copper zone dialog had no option to set the outline smoothing option.
Unfortunately, this parameter was inherited from the last edited copper zone.
And therefore the non copper zone can have a non wanted outline smoothing option.
This option is now added to the dialog.

Fixes: lp:1826952
https://bugs.launchpad.net/kicad/+bug/1826952
2019-04-30 13:16:29 +02:00
John Beard 42d20cbd96 Pcbnew: use same null check as eeschema for recently used
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.

Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.

The same logic in the symbol tree is already handled in the
same way.
2019-04-29 16:52:39 +01:00
jean-pierre charras 0d7708430d Pcbnew: fix in board editor crash when try to load a footprint from Add footprint tool if the latest loaded footprint was deleted.
In this case, the history has a cleared link that created the crash when the dialog tried to select this deleted FootprintEnumerate

Fixes: lp:1826794
https://bugs.launchpad.net/kicad/+bug/1826794
2019-04-29 17:21:51 +02:00
jean-pierre charras e808c7f956 Remove a message used in a previous debug session. 2019-04-27 17:07:31 +02:00
Michael Kavanagh df228a3c10 Pcbnew: Fix missing UI elements for curved ratsnest function
Fixes: lp:1826446
* https://bugs.launchpad.net/kicad/+bug/1826446
2019-04-27 15:11:41 +02:00
Jeff Young 69cdb4a76c Make Import Settings button label more specific.
Fixes: lp:1826477
* https://bugs.launchpad.net/kicad/+bug/1826477
2019-04-26 15:02:17 +01:00
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