Commit Graph

7034 Commits

Author SHA1 Message Date
Jeff Young b08766a2fa Scroll Footprint Viewer to selected item when opening. 2018-10-03 22:46:41 +01:00
Seth Hillbrand 6c693f80a7 pcbnew: Fix polygon corner adding in board editor
Polygon corners were enabled in the footprint editor but the logic
didn't extend to the board editor.  This revises the logic to look for
DRAWSEGMENTs and only reference the PCB_MODULE_EDGE_T where needed to
create a new segment in the footprint.

Fixes: lp:1782966
* https://bugs.launchpad.net/kicad/+bug/1782966
2018-10-03 11:29:02 -07:00
Seth Hillbrand 6a6d580a1c pcbnew: Improve zone/polygon selection
Allows selection of polygons and zones by their visible area.  Will only
select polygons/filled areas when they are unobstructed by other
elements in the footprint/pcb.  Also adds a "skip heuristics" modifier
key for clicking (ALT) that allows the full disambiguation list to be
displayed without removing less-likely elements.  This dovetails the
zone/polygon selection as it allows selecting even when areas a fully
overlapped.

Fixes: lp:1753153
* https://bugs.launchpad.net/kicad/+bug/1753153
2018-10-03 06:23:35 -07:00
jean-pierre charras 2c0fe8f595 Pcbnew: minor fix: avoid flicker in Layer Manager when closing Pcbnew.
It was due to useless paint events during closing, on some platforms.
2018-10-03 09:46:17 +02:00
Seth Hillbrand 57ceec5606 pcbnew: Allow DRC violations when requested in dp 2018-10-02 14:39:53 -07:00
Jeff Young fb4ae4e218 Update FP editor title after a Save As. 2018-10-02 21:05:14 +01:00
Jeff Young 536451138d Make sure fixes to netlist stuff are done on both sides.
This fixes the CmpNoCase() == 0 bug on one side, and the
footprint == null bug on the other side; both of which were
previously fixed on only one side.

Fixes: lp:1795561
* https://bugs.launchpad.net/kicad/+bug/1795561
2018-10-02 18:18:37 +01:00
Jeff Young afd518d1e8 Better logic for footprint loop.
Fixes: lp:1795288
* https://bugs.launchpad.net/kicad/+bug/1795288
2018-10-01 22:05:47 +01:00
Jeff Young dfe164e0dc Only clear link when adding footprint from library, cache, etc.
Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-10-01 19:22:42 +01:00
jean-pierre charras db5386467b Re activate Zone Unfill All command, accidentally removed by a previous commit.
Fixes: lp:1795293
https://bugs.launchpad.net/kicad/+bug/1795293
2018-10-01 09:04:14 +02:00
Seth Hillbrand 89a3d2b451 pcbnew: Force at least one connectivity thread
We want to keep at most 1 thread per 2 connectivity updates but we need
to force that floor to be at least 1 for when there is only 1
connectivity update.

Fixes: lp:1795245
* https://bugs.launchpad.net/kicad/+bug/1795245
2018-09-30 12:13:57 -07:00
Jeff Young f06bf81651 Don't deselected items that have been deleted.
De-referencing freed memory is never a good idea.

Fixes: lp:1795195
* https://bugs.launchpad.net/kicad/+bug/1795195
2018-09-30 15:47:18 +01:00
Seth Hillbrand ef6f7e96f3 pcbnew: Handle SEGZONE in GAL
SEGZONEs are no longer created by pcbnew but may exist in older boards.
This allows deleting the old fills in a manner similar to the deletion
in Legacy canvas.

Fixes: lp:1794571
* https://bugs.launchpad.net/kicad/+bug/1794571
2018-09-29 15:09:15 -07:00
Seth Hillbrand b3a5e08c2f pcbnew: Rename PCB_ZONE_T and remove from connectivity
SEGZONE types were confusingly named PCB_ZONE_T.  Zones in pcbnew are
now _only_ PCB_ZONE_AREA_T, so we name segzone types PCB_SEGZONE_T to be
clear.

This also removes processing of the SEGZONEs from connectivity
calculations.
2018-09-29 15:09:15 -07:00
Seth Hillbrand a81e3c2b13 pcbnew: Avoid double-separators in context menu 2018-09-29 15:09:15 -07:00
Jeff Young b49ca04355 Remove max length on layer names.
Fixes: lp:1745587
* https://bugs.launchpad.net/kicad/+bug/1745587
2018-09-29 22:07:31 +01:00
Jeff Young 19b1ae35ce Don't assume GetFlags() != 0 means it's being edited.
It could just mean it's selected, highlighted or brightened.

Fixes: lp:1794624
* https://bugs.launchpad.net/kicad/+bug/1794624
2018-09-27 22:18:13 +01:00
Seth Hillbrand 317ca8e64d pcbnew: Do not allow drag to violate DRC without permission
m_dragstatus is set to true when a valid route is created given the
user's constraints.  We need to check this before committing the route
to the board.

Fixes: lp:1794810
* https://bugs.launchpad.net/kicad/+bug/1794810
2018-09-27 13:08:22 -07:00
Jeff Young fac5fcb476 Don't draw the pad preview highlighted. 2018-09-27 17:46:51 +01:00
Jeff Young 50b96b406f More net selector fixes. 2018-09-27 16:58:12 +01:00
jean-pierre charras 1685af8425 dialog_track_via_properties_base.cpp: fix a few wxWidgets alerts. 2018-09-27 13:36:50 +02:00
Jeff Young 6764cda34d Fix issues with pad locking.
Fixes: lp:1794548
* https://bugs.launchpad.net/kicad/+bug/1794548
2018-09-26 21:57:35 +01:00
Seth Hillbrand 65678b223a pcbnew: Fixup for 491098af3
Unselecting performs two functions: unselecting and unhighlighting.
Some items may be deselected but still live in the temporary highlighted
layer (e.g. selecting a footprint and exchanging it).  Since there is no
harm in unselecting an unselected item, we can allow it to proceed
without the check.
2018-09-26 08:54:09 -07:00
Wayne Stambaugh b487a8c70e Pcbnew: fix track and via properties dialog control alignment issues. 2018-09-26 09:15:58 -04:00
Seth Hillbrand 491098af35 pcbnew: Deselect all items in a delete commit at once
Deselecting each individually had the side-effect of possibly re-drawing
the view in between actions, leading to visible artifacts in the router
(where invisible items are set visible before committing a change)
2018-09-26 05:41:14 -07:00
Baranovskiy Konstantin f68581d463 Pcbnew: fix column width in Nets dialog.
Nets dialog (Inspect->List Nets) contains list control
that has very small width for first and last columns.
Changed algorithm for calculating optimal values for
column width.
2018-09-26 04:26:09 -07:00
Jeff Young 86b654e493 Hook up 3D viewer to common preferences.
Also removes nanny limits on text sizes.

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

Fixes: lp:1794345
* https://bugs.launchpad.net/kicad/+bug/1794345
2018-09-25 20:47:03 +01:00
Jeff Young dfd028a66a Don't gray out non-enabled layers in layers setup panel.
Fixes: lp:1794215
* https://bugs.launchpad.net/kicad/+bug/1794215
2018-09-25 20:47:03 +01:00
Baranovskiy Konstantin 12e38bc5fa Pcbnew: make units in ViaSizeSelectBox translatable. 2018-09-25 12:27:06 -07:00
Baranovskiy Konstantin 682cb3abe1 Pcbnew: make "Swap Layers" title translatable. 2018-09-25 12:18:50 -07:00
Jeff Young 37f7faf433 Move lock checks to CLIENT_SELECTION_FILTER.
Also checks render item visibility as well as layer visibility
when making selections.

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

Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Seth Hillbrand 686f1b878b Prevent re-testing DRC on zones
We only need to test zone connections once, so we skip the double-check
from the nested loop unless we are only checking a single zone.  Then
the second loop needs to iterate over the full list of zones.
2018-09-25 09:24:34 -07:00
Seth Hillbrand b1d44ed415 Revert "Don't double-check all zones."
This reverts commit b842e4556d.

When a specific zone is tested, we need to iterate over all other zones
on the board.
2018-09-25 08:48:22 -07:00
Seth Hillbrand ee465fb23c pcbnew: Fixup for edde02481 to enable aux axis
Correcting edde02481 which had side effects to
efdbc91e42 while dragging a line but not a
zone.
2018-09-24 14:29:23 -07:00
Seth Hillbrand edde02481e pcbnew: Fix alignment with off-grid drag
Commit efdbc91e42 broken the primary
alignment mechanism for maintaining the current point as an auxilliary
grid reference.  This reverts that commit and fixes both the initial
issue and the associated bug by applying the primary constraint after
the secondary.  In this way, we consider the secondary constraint as an
additive rather than alternative constraint.

Fixes: lp:1793888
* https://bugs.launchpad.net/kicad/+bug/1793888
2018-09-24 14:07:30 -07:00
Wayne Stambaugh 282e37b2bf Pcbnew: change step export dialog action button text.
Change "OK" to "Export" so user is not surprised by the fact that the
dialog does not close after the step file is created..

Fixes lp:1784260

https://bugs.launchpad.net/kicad/+bug/1784260
2018-09-24 14:57:02 -04:00
Jeff Young efefbf0fa0 Fix typo for updating library trees.
Fixes: lp:1794087
* https://bugs.launchpad.net/kicad/+bug/1794087
2018-09-24 15:46:45 +01:00
jean-pierre charras 6a02f788fd Excellon drill file exporter: minor enhancements. 2018-09-24 13:49:46 +02:00
jean-pierre charras 12ed6ab9e3 Excellon drill file exporter: activate routing mode for oval holes. 2018-09-24 13:12:48 +02:00
jean-pierre charras 2f4f623a31 Pcbnew, Excellon drill file generator: Oval holes: add a routing mode G01 command.
It can be used instead of the slot (G85) command to create oval holes.
Do not yet activate it.

Oval holes frequently create issues with board houses.
Using a more usual routing (G01) command could solve some issues.
2018-09-24 13:12:48 +02:00
Tomasz Włostowski f16f0fc215 pcbnew: intermittent fix for crash on save after undoing board update. 2018-09-24 09:27:55 +02:00
Jeff Young f3c6e1fb62 Change Position Relative To to use anchor, not centroid.
Fixes: lp:1793984
* https://bugs.launchpad.net/kicad/+bug/1793984
2018-09-24 00:42:56 +01:00
Jeff Young 9eb574015c Fix typo in UpdateNetlist() which was making a real mess of things.
Fixes: lp:1793987
* https://bugs.launchpad.net/kicad/+bug/1793987
2018-09-23 23:51:13 +01:00
Jeff Young 4b493e45eb Don't consider non-tracks when seeing if we can do a router drag.
Fixes: lp:1793979
* https://bugs.launchpad.net/kicad/+bug/1793979
2018-09-23 23:51:13 +01:00
Seth Hillbrand 518b53f78c pcbnew: Cancel highlight with ESC
When editing the pcb, Ctrl-Click will highlight a net.  This allows
de-highlight with the ESC/cancel action from the selection tool.  Inside
the highlight tool, ESC reverts to the selection tool while keeping the
net highlighted.

Fixes: lp:1793842
* https://bugs.launchpad.net/kicad/+bug/1793842
2018-09-23 15:09:18 -07:00
Seth Hillbrand e0316af69c pcbnew: Prevent redo while moving items
Fixes: lp:1793948
* https://bugs.launchpad.net/kicad/+bug/1793948

(cherry picked from commit c5c89fd216)
2018-09-23 06:03:41 -07:00
Seth Hillbrand 525e26eb82 kicad2step: Provide floats separated
Clang++ seems to be in left-field here as it processes a stringstream
1.0X1.0 >> double as a hexadecimal floating point ('X' character) and
throws an error rather than converting 1.0 and stopping when it reaches
a non-numeric character.  This causes errors when exporting step on Mac,
which uses clang++ by default.

Adding spaces to the string is more explicit and doesn't break gcc.  It
will be sufficient until we get rid of kicad2step as an external
utility.

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

(cherry picked from commit e7a9643b37)
2018-09-22 08:52:46 -07:00
Jeff Young a1bcc4ba1e Don't start dragging until Update PCB dialog has been closed.
Fixes: lp:1793828
* https://bugs.launchpad.net/kicad/+bug/1793828
2018-09-22 16:23:13 +01:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Jeff Young 666da3849b Make esc dismiss net and layer selector popups. 2018-09-22 16:23:13 +01:00
Wayne Stambaugh e5ff4f8582 Pcbnew: fix lock file bug on windows.
The lock file code would reset the lock file every other time the same
board file was opened in Pcbnew in the stand alone mode.  This created
the perfect toggle switch causing the board to be reloaded every other
time the same board was selected.

Please note that wxSingleInstanceChecker is broken on Linux and most
likely MacOS as well due to a bug in wxWidgets.  On these platforms,
the already opened file is reopened rather than displaying a warning
that the file is already opened.

Fixes lp:1777599

https://bugs.launchpad.net/kicad/+bug/1777599
2018-09-22 08:20:04 -04:00
Seth Hillbrand 969e85daa3 pcbnew: Standardize zone fills threading
This is a boyscouting commit to standardize the threading of zone fills.
We do not need to join threads after their completion, instead we simply
allow them to clean up their memory without blocking the user.  This
also sets the maximum number of threads that may be created to the
number of zones being filled.  More than this will only leave un-used
threads being created and immediately killed.

We also include the connectivity search as a phase in the fill progress
reporter.  This was the case before but did not utilize the correct
maxsize, leading to stalled progress bar.
2018-09-21 12:44:20 -07:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Jeff Young 9a5334478b Careful of net[0]; it's "No Net", not a real net.
Fixes: lp:1792235
* https://bugs.launchpad.net/kicad/+bug/1792235
2018-09-21 20:40:04 +01:00
jean-pierre charras 0be52a68fe Update PCB from schematic or Read netlist doesn't add new footprints when the board has no existing footprints (empty board)
Fixes: lp:1793396
https://bugs.launchpad.net/kicad/+bug/1793396
2018-09-21 10:14:10 +02:00
Seth Hillbrand 8c3a82e526 Code cleanup: Fixing assignment operators 2018-09-20 20:15:47 -07:00
Seth Hillbrand c0f067bf90 pcbnew: Remove OpenMP
OpenMP is not available for macos, so moving to a std::threads
implementation brings platforms into shared code.

This also reduces the OpenMP overhead when computing connectivity and
ratsnests.

Fixes: lp:1780130
* https://bugs.launchpad.net/kicad/+bug/1780130
2018-09-20 15:40:02 -07:00
Jeff Young 3e45483798 Separate edge.cuts and courtyards in ModEdit default values.
Fixes: lp:1788876
* https://bugs.launchpad.net/kicad/+bug/1788876
2018-09-20 23:30:13 +01:00
Jeff Young 04534c83e0 Allow marker selection in high-contrast mode.
Fixes: lp:1793357
* https://bugs.launchpad.net/kicad/+bug/1793357
2018-09-20 21:54:47 +01:00
Seth Hillbrand 47fac8a259 Removing some unused code 2018-09-20 12:52:53 -07:00
Martin Aberg 27d57d9191 Generate PYTHONPATH from CMake information
The CMake scripts calculate the install path for python scripts by
  distutils.sysconfig.get_python_lib(
    plat_specific=0,
    standard_lib=0,
    prefix=''
  )
which generates a string in line with
  lib/python2.7/site-packages

This string ends up in the CMake variable PYTHON_DEST and is used by the
install step as destination directory for pcbnew.py.

There has been a hard-coded assumption on the content of that string in
PcbNew which is not compatible with FreeBSD 11.1.

This commit eliminates the hard-coded assumption in PcbNew and reuses
the install path as known by CMake.

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

(cherry picked from commit dd3c24faf8)
2018-09-20 12:04:04 -07:00
Jeff Young 6be2733285 Fix a few more no-long-necessary non-copper layer restrictions. 2018-09-19 22:23:18 +01:00
Jeff Young 2f2cfe423e A bit of added safety regarding edit vs. display flags. 2018-09-19 22:23:18 +01:00
Wayne Stambaugh ed94f2c5e0 Pcbnew: fix minor bug in find dialog.
Repeating find with the same search string would result in a not found
error for absolute search strings.  Don't clear the found item if the
search string did not change from the previous search..

Fix another minor bug where the do not warp mouse pointer option was
always checked when the find dialog was called from one of the gal
canvases.

Fixes lp:1793300

https://bugs.launchpad.net/kicad/+bug/1793300
2018-09-19 12:31:17 -04:00
Jeff Young ebb74fcc2b Honour diff-pair dimension changes while routing. 2018-09-18 20:37:00 +01:00
Jeff Young e485cee384 Honour ModEdit layer colors in browser and previews.
Fixes: lp:1793141
* https://bugs.launchpad.net/kicad/+bug/1793141
2018-09-18 19:14:35 +01:00
Jeff Young 9f068d66a8 Don't use diff-pair gap as a clearance.
Fixes: lp:1789690
* https://bugs.launchpad.net/kicad/+bug/1789690
2018-09-18 17:44:53 +01:00
Jeff Young 9c708c6177 Use DP netclass values when custom or predefined are not selected.
Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670
2018-09-18 17:44:53 +01:00
Seth Hillbrand adb89afe6c Allow SELECTED for single edits
We like to allow items that are marked SELECTED to remain so during
editing but this does not indicate that there are multiple edits queued,
so do not prevent pushing this into the undo queue.
2018-09-18 03:52:15 -07:00
Seth Hillbrand 9cafe65e84 pcbnew: Allow user-setting rounded rectangle radius
When designing pads, it can be helpful to not only see the resulting
rounded rectangle radius from a given percentage but also to set it,
constraining the related percentage.  This adjusts the dialog to allow
editing the rounded rectangle corner radius.  It does not change the
file format as the resulting ratio is saved.  Further updates of the pad
size or ratio will modify the radius.

Fixes: lp:1668020
* https://bugs.launchpad.net/kicad/+bug/1668020
2018-09-17 15:59:53 -07:00
Seth Hillbrand 49735c219b pcbnew: Don't merge zones with different params
Zones can be explicitly merged even if they do not have the same
parameters.  Automatic merging should only occur when all of the zone
parameters are exactly identical to allow for area-specific zone
parameters.

( cherry-picked from 3d0915a33 )

Fixes: lp:1695761
* https://bugs.launchpad.net/kicad/+bug/1695761
2018-09-17 12:17:22 -07:00
Seth Hillbrand 44b4f8a104 pcbnew: prevent different keepout zones from merging
Keepout zones can have different layer sets and different restrictions
that should not be combined unless they are identical.

( cherry-picked from a67bfa620 )
Fixes: lp:1789062
* https://bugs.launchpad.net/kicad/+bug/1789062
2018-09-17 11:54:27 -07:00
Seth Hillbrand 7470d5ba98 pcbnew: retain selection between edits
We had been deselecting items after calling edits to be safe in case the
item was deleted/exchanged by the edit.  The item pointer itself remains
valid even when deleting as it is assigned to the undo stack.  But it
should not remain visible or selected on the schematic if it is removed.

This tests for removed items by checking whether it (in the case of
first-level BOARD_ITEMS) or its parent (in the case of footprint item
components) remain in the view list after editing.  If they are still in
the view list, then we re-select them.

( cherry-picked from 2c6d0ffe2 )
Fixes: lp:1765774
* https://bugs.launchpad.net/kicad/+bug/1765774

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:58:42 -07:00
Jeff Young 99cb1471c3 Added safety for POINT_EDITOR.
Fixes: lp:1786349
* https://bugs.launchpad.net/kicad/+bug/1786349
2018-09-17 18:01:08 +01:00
Jeff Young cd7ebaf9ee Generate duplicate footprint errors when reading netlist.
Fixes: lp:1682970
* https://bugs.launchpad.net/kicad/+bug/1682970
2018-09-17 18:01:08 +01:00
Jeff Young a53b163456 Use resize() instead of reserve()/fill() so hardeners don't choke.
Fixes: lp:1789283
* https://bugs.launchpad.net/kicad/+bug/1789283
2018-09-17 18:01:08 +01:00
Jeff Young a40ab768fc Allow deletion of non-Reference/non-Value module text items.
Fixes: lp:1781226
* https://bugs.launchpad.net/kicad/+bug/1781226
2018-09-17 18:01:08 +01:00
Seth Hillbrand dd228b60a7 pcbnew: Allow removing corners from graphical polygons
( cherry-picked from 22df4e301 )

Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:27:07 -07:00
jean-pierre charras d4e4359289 pcb_parser.cpp: allows 0 width line thickness for circles in custom shaped pads.
the commit 1100ccb032 broke DRAWSEGMENT filled circles (line width = 0) used only in custom pads.

Fixes: lp:1792791
https://bugs.launchpad.net/kicad/+bug/1792791
2018-09-16 15:21:18 +02:00
Seth Hillbrand 9523b26472 pcbnew: Fix dragging snap to items
Snapping while dragging depends on the current net being assigned during
dragging.  This initializes the placer to hold the current net while
performing inline dragging.  The placer is reset along with the dragger
in StopRouting().  This fixes the difference in snap between drag and
create new route.

( cherry-picked from 219695953 )
2018-09-15 20:22:34 -07:00
Jeff Young 2b634004ee Track widths and via sizes are in mils.
Fixes: lp:1792748
* https://bugs.launchpad.net/kicad/+bug/1792748
2018-09-15 22:46:04 +01:00
Jeff Young ae5183f614 Add test for duplicate footprints to Update from PCB. 2018-09-15 20:06:42 +01:00
Jeff Young 02a3f83040 Implement poor-man's RTTI for use over KiWAY.
Fixes: lp:1777883
* https://bugs.launchpad.net/kicad/+bug/1777883
2018-09-15 20:06:42 +01:00
Jeff Young 3e61a32fbe Attempt to use envVars when adding new libraries.
Fixes: lp:1785441
* https://bugs.launchpad.net/kicad/+bug/1785441
2018-09-15 20:06:42 +01:00
Jeff Young 4854d92c73 Subtract out unconnected net when reporting number of nets.
Fixes: lp:1792235
* https://bugs.launchpad.net/kicad/+bug/1792235
2018-09-15 20:06:42 +01:00
Seth Hillbrand cf2980e1b2 pcbnew: Add corners in polygons
Allow corner adding to polygons in both module editor and board editor.
The board editor was already allowed but only through special types.
The module editor is now sychronized to the same process and both
recognize standard context menus

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

( cherry-picked from 06ac172c2 )
2018-09-15 10:02:58 -07:00
Seth Hillbrand efdbc91e42 pcbnew: snap final points to grid
When constraining moves, the cursor snaps to grid but does not
represent the position of the final edited point.  The point is rotated
to the nearest snap angle, while the vector length remains unchanged
resulting in a line longer than intended and off-grid.

This adds a grid-snap after the constraint is applied.

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

( cherry-picked from e7c51a6a6 )
2018-09-15 09:53:52 -07:00
jean-pierre charras b60c368b3c DXF import: fix incorrect import of arcs.
The new dxflib uses degrees, not radians for angles.

Fixes: lp:1792413
https://bugs.launchpad.net/kicad/+bug/1792413
2018-09-15 18:18:33 +02:00
Jeff Young e3f74646b9 Allow measure tool to survive zoom and pan.
Fixes: lp:1792232
* https://bugs.launchpad.net/kicad/+bug/1792232
2018-09-14 11:00:13 +01:00
Jeff Young a5e2ddd65a Don't save footprint when it's renamed; wait for the user to save.
Fixes: lp:1792243
* https://bugs.launchpad.net/kicad/+bug/1792243
2018-09-14 10:21:45 +01:00
Jeff Young 0f9ded9563 Space out placed footprints with some padding.
Fixes: lp:1788917
* https://bugs.launchpad.net/kicad/+bug/1788917
2018-09-14 10:21:45 +01:00
Jeff Young 4d6cd52ffc Fix some tooltips.
Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-09-14 10:21:45 +01:00
Jeff Young e5e1a315f1 Keep name & value in sync for library items.
Also fixes library reference highlighting from board footprints.

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

Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-09-13 16:41:23 +01:00
Seth Hillbrand a04ef37d67 pcbnew: Parallelize initial board triangulation
Triangulation of zones can be time consuming for large boards.  This
adds a std::thread implementation of parallel zone loading to speed this
process on multi-core machines.
2018-09-12 15:28:13 -07:00
Jeff Young ba8647f676 Fix compiler warning. 2018-09-12 21:39:41 +01:00
Jeff Young b43d0a0ed5 Add file missing from last commit. 2018-09-12 21:39:26 +01:00
Jeff Young cbc83c98bc Make sure Save As and Export use board footprint when selected.
Fixes: lp:1792207
* https://bugs.launchpad.net/kicad/+bug/1792207
2018-09-12 21:27:03 +01:00
Jeff Young a46133d64b Replace SetValue() with ChangeValue() to prevent unwanted events.
Fixes: lp:1792070
* https://bugs.launchpad.net/kicad/+bug/1792070
2018-09-12 19:34:55 +01:00
Seth Hillbrand ded64aef3d pcbnew: Control cursor capture in microwave tool
Turns off cursor capture when the microwave tool is not actively drawing
a new inductor.

Fixes: lp:1792128
* https://bugs.launchpad.net/kicad/+bug/1792128
2018-09-12 09:11:48 -07:00
Jeff Young 806b1fc63d Fix bugs to enable read-only grid cells to be copied.
Fixes: lp:1791129
* https://bugs.launchpad.net/kicad/+bug/1791129
2018-09-12 14:01:36 +01:00
Jeff Young 8b064e1ee2 Use zone outline for instersection when it isn't filled.
Keepout zones, in particular, are never filled.

Fixes: lp:1791965
* https://bugs.launchpad.net/kicad/+bug/1791965
2018-09-12 14:01:35 +01:00
Jeff Young cbb3492d98 Standardize Footprint Viewer and Footprint Browser.
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.

Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667
2018-09-12 14:01:35 +01:00
Seth Hillbrand 29b4ac7cb8 pcbnew: Fix Eagle import hole offset
Unplated holes in Ealge can either be free floating or part of a larger
footprint.  We handle both in the same packageHole routine by either
offsetting the hole in a centered footprint or offsetting the footprint
in a centered hole.

Fixes: lp:1791287
* https://bugs.launchpad.net/kicad/+bug/1791287
2018-09-08 20:42:23 -07:00
Seth Hillbrand 21ea31af15 pcbnew: Allow selection of back pads
Pads should be selectable when the respective copper layer is enabled.

Fixes: lp:1789084
* https://bugs.launchpad.net/kicad/+bug/1789084
2018-09-08 17:25:34 -07:00
Seth Hillbrand c9fc20c54e pcbnew: Add Eagle milling layer to edge_cuts
The Eagle milling layer (46) is valid for cutouts on the board.

Fixes: lp:1791284
* https://bugs.launchpad.net/kicad/+bug/1791284
2018-09-08 17:25:24 -07:00
qu1ck c68ad411ff pcbnew: add 3d models properties to swig
Fixes: lp:1758858

https://bugs.launchpad.net/kicad/+bug/1758858
2018-09-08 10:28:55 -04:00
Seth Hillbrand a5dd86f411 pcbnew: Set soldermask on NPTH imported from Eagle
Fixes: lp:1773253
* https://bugs.launchpad.net/kicad/+bug/1773253
2018-09-06 09:01:23 -07:00
Seth Hillbrand 1100ccb032 pcbnew: Set default line width for invalids
Invalid graphical items that cannot be created in pcbnew may still be
created by external tools.  This synchronizes the pcbnew view display
with the gerber output and 3d viewer line widths for these types of
lines.  Only filled polygons are permitted 0-width lines.

Fixes: lp:1790534
* https://bugs.launchpad.net/kicad/+bug/1790534
2018-09-05 16:32:55 -07:00
jean-pierre charras bfb0fac015 Minor fixes related to I18n 2018-09-05 13:59:20 +02:00
Maciej Suminski 5993b33010 Relax selection discard rules for footprints with area larger than the viewport
Normally working at a zoom level when a footprint is not fully displayed
indicates that the user modifies other components. Selection Tool used
to discard footprints that had area larger than the viewport area, but
it may make sense to select them if there are no other candidates.

Fixes: lp:1789578
* https://bugs.launchpad.net/kicad/+bug/1789578
2018-09-05 11:26:02 +02:00
jean-pierre charras 99216a76d7 Fix incorrect (empty) strings marked for translation
Empty strings are illegal for I18n tools.
2018-09-04 20:22:07 +02:00
Maciej Suminski de65ca512f Fixed reference to PCB_EDIT_FRAME in PANEL_SETUP_LAYERS
GetParent() in PANEL_SETUP_LAYERS::TransferDataFromWindow() returns a
wxTreebook pointer, instead of expected PCB_EDIT_FRAME resulting in a
crash.
2018-09-04 12:29:36 +02:00
Franck78 009dfa411f Finish track with 'activate router hotkey'
Fixes: lp:1790552
* https://bugs.launchpad.net/kicad/+bug/1790552
2018-09-04 12:08:40 +02:00
Maciej Suminski dd3d10d9ce Removed stale files related to FreeRoute support
Fixes: lp:1787718
* https://bugs.launchpad.net/kicad/+bug/1787718
2018-09-04 11:54:42 +02:00
Seth Hillbrand 1d9c9cd10d pcbnew: Select copper through THT connections
This allows full copper connections even when THT changes a trace layer.
It avoides selecting the actual pad to prevent actions on the copper
connections from affecting the footprints as well.

Fixes: lp:1789807
* https://bugs.launchpad.net/kicad/+bug/1789807
2018-09-03 07:44:44 -07:00
jean-pierre charras 0d09128f6c Dialog copper zones: add test for thermal spoke width > zone min thickness.
Fixes: lp:1789929
https://bugs.launchpad.net/kicad/+bug/1789929
2018-09-03 13:57:11 +02:00
jean-pierre charras 27b62c66b3 Remove an unused var. 2018-09-02 10:22:41 +02:00
Thomas Pointhuber 2b59c976f2 Add Insert/Delete button to Tracks and Via setup panel
GRID_TRICKS cannot handle row label events at the moment, so I disabled them.

Fixes: lp:1788877
* https://bugs.launchpad.net/kicad/+bug/1788877
2018-09-01 17:53:49 +01:00
Jeff Young 72cf340119 Validate differential pair dimensions.
Fixes: lp:1789293
* https://bugs.launchpad.net/kicad/+bug/1789293
2018-09-01 14:05:16 +01:00
Jeff Young 4174ecf4c3 Only validate via size vs drill if both are specified.
Fixes: lp:1789349
* https://bugs.launchpad.net/kicad/+bug/1789349
2018-09-01 14:05:16 +01:00
Seth Hillbrand 5cd7549e53 pcbnew: Only regenerate BBox if the item is valid
Items removed from the connectivity list will not have valid parents, so
we cannot update the BBox, thus we will only use the cached value.

Fixes: lp:1785605
* https://bugs.launchpad.net/kicad/+bug/1785605
2018-08-31 18:46:06 -07:00
Seth Hillbrand 0109641c2f gal: correct layer ordering
Net labels need to be rendered under the selected item.

Fixes: lp:1790016
* https://bugs.launchpad.net/kicad/+bug/1790016
2018-08-30 16:55:48 -07:00
Seth Hillbrand 83e6940592 pcbnew: Correcting commit f84bd0d83 for 5.0/release
Previous commit only functioned correctly in debug mode.  Also cleanup a
left-over debug printf() and revert a changed translated string.
2018-08-30 13:27:32 -07:00
Seth Hillbrand 34b920a74f pcbnew: Fix Eagle UTF8 import error
Implicit convertion from wxString to std::string will use narrow strings
and drop UTF-8.

Fixes: lp:1789311
* https://bugs.launchpad.net/kicad/+bug/1789311
2018-08-30 13:08:21 -07:00
Seth Hillbrand d45946396c pcbnew: Fix loop condition when unhighlighting modules
Text can be included in the same selection group as the parent module.
Thus if we clear the selection marker on a module's child elements we
also need to remove the element from the selection group.

Fixes: lp:1789418
* https://bugs.launchpad.net/kicad/+bug/1789418
2018-08-30 09:27:42 -07:00
jean-pierre charras 01acc0d9be Remove an unused variable that created a memory leak. 2018-08-30 10:04:04 +02:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Jeff Young 9125d7fdb6 Fix typo. 2018-08-29 22:45:45 +01:00
Jeff Young b562ecc5b5 Check for net changing before confirming.
Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 22:43:05 +01:00
Jeff Young 658e387ad4 Slightly better swap layer column names.
Fixes: lp:1789390
* https://bugs.launchpad.net/kicad/+bug/1789390
2018-08-29 22:04:07 +01:00
Jeff Young 2e8f2d2850 Allow Export even when libId is empty.
For instance, after an import.

Fixes: lp:1785226
* https://bugs.launchpad.net/kicad/+bug/1785226
2018-08-29 20:08:01 +01:00
Jeff Young f1ef18edcb Fix assert where wxFormBuilder rows disagreed with controls. 2018-08-29 20:08:01 +01:00
Jeff Young 8fe5ff612d Print PCB objects before zones.
Fixes: lp:1785958
* https://bugs.launchpad.net/kicad/+bug/1785958
2018-08-29 20:08:01 +01:00
Jeff Young f611333ea1 Make fast grid switching hotkeys more visible.
Fixes: lp:1787066
* https://bugs.launchpad.net/kicad/+bug/1787066
2018-08-29 20:08:01 +01:00
Jeff Young f470132862 Fix fast grid switching for OSX and Footprint Editor.
Fixes: lp:1787066
* https://bugs.launchpad.net/kicad/+bug/1787066
2018-08-29 20:08:01 +01:00
Jeff Young a8bb5d7308 Improve labels.
First two radio buttons together read "Do not show On pads", which is
of course backwards for the second.
2018-08-29 20:08:01 +01:00
Jeff Young 424905fb61 Fix netclass popups in netclass membership grid. 2018-08-29 20:08:01 +01:00
Jeff Young e55547223e ModEdit Save should save back to board if that's where the FP came from.
Use Save As... if you want to put it in a library.

Fixes: lp:1788924
* https://bugs.launchpad.net/kicad/+bug/1788924
2018-08-29 20:08:01 +01:00
Jeff Young 21eea1f567 Remove HasFocus() checks (which don't work on all platforms) in favour of row highlighting which is visible without focus.
Fixes: lp:1788873
* https://bugs.launchpad.net/kicad/+bug/1788873
2018-08-29 20:08:01 +01:00
Jeff Young 75a4928134 Split edge.cuts and courtyard layer defaults.
Fixes: lp:1788876
* https://bugs.launchpad.net/kicad/+bug/1788876
2018-08-29 20:08:01 +01:00
Jeff Young 030663d847 Tighten up the margin to the right of the layers widget.
Fixes: lp:1788462
* https://bugs.launchpad.net/kicad/+bug/1788462
2018-08-29 20:08:01 +01:00
Jeff Young f9412f0fd4 Implement double-click for other filetypes in project tree.
Fixes: lp:1787207
* https://bugs.launchpad.net/kicad/+bug/1787207
2018-08-29 19:59:02 +01:00
Jeff Young 45bc1b1aff Add single-click editing to grid cells. (Experimental.) 2018-08-29 19:59:02 +01:00
Jeff Young b90a261d5c More safety fixes for uncommitted grid changes. 2018-08-29 19:59:01 +01:00
Seth Hillbrand 2398edda38 pcbnew: Only dp clearance matrix when routing dp
Fixes: lp:1787766
* https://bugs.launchpad.net/kicad/+bug/1787766
2018-08-29 10:26:39 -07:00
jean-pierre charras 020d837de6 Dialog pad properties: fix not working orientation choice in countries using comma as floating point separator.
The values in choice are 0.0 90.0 not compatible with floating point notation (0,0 90,0)
and always detected as bad values (unless you have loaded a up to date dictionary, which is not necessary the case)

good values are in any case 0 90 180 and -90
2018-08-29 17:27:50 +02:00
Seth Hillbrand dc4125206b GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 15:00:05 -07:00
Seth Hillbrand f4eaf55497 pcbnew: keep selected zone highlighted when moding
When adding a cutout to a zone, it helps to have the zone highlighted so
that you can see when zone you are operating on.
2018-08-28 14:59:54 -07:00
Seth Hillbrand e160eb0677 pcbnew: Adding some missing TypeOf() functions
Missing types were handled by the superclass (in the case of zones)
PCB_CONNECTED_ITEM, which incorrectly returned "true" when testing lines
against zones.

Fixes: lp:1789195
* https://bugs.launchpad.net/kicad/+bug/1789195
2018-08-28 13:19:29 -07:00
Seth Hillbrand c6d1433523 modedit: clear the pcb when closing the window
Before closing the window in the footprint editor, we clear the existing
pcb, undo/redo stack and associated memory to prevent callbacks
double-freeing on destruction.

Fixes: lp:1784504
* https://bugs.launchpad.net/kicad/+bug/1784504
2018-08-28 12:36:06 -07:00