Commit Graph

13442 Commits

Author SHA1 Message Date
Seth Hillbrand 2c6d0ffe27 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.

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

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:39:31 -07:00
Wayne Stambaugh 0ff84865ca Update translators list to include simplified Chinese translator. 2018-09-17 11:53:55 -04:00
jean-pierre charras 36746a0941 Grid settings do not accept "." and "," as decimal separator unlike many other dialogs.
Fixes: lp:1792871
https://bugs.launchpad.net/kicad/+bug/1792871
2018-09-17 17:04:42 +02:00
Seth Hillbrand 22df4e301b pcbnew: Allow removing corners from graphical polygons
Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:26:00 -07:00
jean-pierre charras ac0c7441b4 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:22:59 +02:00
Seth Hillbrand 2196959539 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.
2018-09-15 20:21:38 -07:00
Seth Hillbrand 06ac172c27 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
2018-09-15 09:53:31 -07:00
Seth Hillbrand e7c51a6a6c 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
2018-09-15 07:52:17 -07:00
Wayne Stambaugh 079d6b2009 Eeschema, fix broken instances of symbols in rescue dialog.
The symbol library table rescue candidate was only using the item name
of the library ID object which was being compared to the fully formatted
library ID causing a comparison failure so no instances of any rescued
symbols was shown in the dialog.

Fixes lp:1791805

https://bugs.launchpad.net/kicad/+bug/1791805
2018-09-14 17:43:22 -04:00
jean-pierre charras 8cbe5c2184 3D viewer: Better axis rotation when selecting "Bottom view" It allows keeping texts on bottom side readable (rotation similar to the Flip board view in board editor) 2018-09-14 08:05:45 +02:00
Jeff Young a7d7ab32c6 Fix 5.0 regression on typing units into some dialog fields.
Fixes: lp:1792066
* https://bugs.launchpad.net/kicad/+bug/1792066
2018-09-13 19:14:32 +01:00
Seth Hillbrand 61715a8df5 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:10:58 -07:00
Maciej Suminski a149960faa Eagle SCH importer: fix slash characters when fixing symbol names
Even though slash is a valid character in symbol names, it is a revision
separator, but is not the case with Eagle symbol names.

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

(cherry-picked from commit 2c217499)
2018-09-12 10:54:58 +02:00
Maciej Suminski 650ff5e5fe kicad2step: Implement overwrite protection, handle 'force overwrite' flag
Fixes: lp:1791826
* https://bugs.launchpad.net/kicad/+bug/1791826

(cherry-picked from commit c120ae9e)
2018-09-11 09:26:55 +02:00
Maciej Suminski 0c42d988f7 kicad2step: Set correct file extension if no output file is specified
(cherry-picked from commit 7037e422)
2018-09-11 09:25:09 +02:00
Alexey Chernov a84de7cccf Adding OpenSSL include directory explicitly
Fixes: lp:1791164
* https://bugs.launchpad.net/kicad/+bug/1791164

( cherry-picked from 3ad1cd8d5 )
2018-09-10 07:18:18 -07:00
Maciej Suminski e9b1552b16 Spice netlist exporter: make directives case insensitive, extra comments
(cherry-picked from commit 4a57541b)
2018-09-10 14:21:27 +02:00
Joël Bertrand 27b88be61f Spice netlist exporter: handle .control .. .endc blocks
Spice may include a list of directives that are wrapped with
.control and .endc. Such directives do not have a dot prefix, so
they need to be handled in a special way.

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

(cherry-picked from commit 36f2eb11)
2018-09-10 14:21:27 +02:00
Maciej Suminski 280573e9af 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

(cherry-picked from commit 5993b330)
2018-09-10 14:21:27 +02:00
Maciej Suminski 14e42fec7e Changed the OpenGL CMake preference to LEGACY
Certain distribution does not handle GLVND well, as the result the
accelerated canvas is not enabled. For the time being it is better to
keep using the legacy preference.

Thanks to Aurelio Lucchesi for investigating the cause.

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

(cherry-picked from commit 01925fd6)
2018-09-10 14:21:27 +02:00
jean-pierre charras 7e8c5b9574 Eeschema: fix incorrect/incomplete annotation clearing in duplicate and paste block (happens in complex hierarchy) 2018-09-09 09:19:22 +02:00
jean-pierre charras 500abd0ac4 Eeschema: fix incorrect references clearing for shared sheet paths.
Previously, when creating a new instance of a sheet, the full set of references
was cleared.
Moreover, if this sheet has sub-sheets, the annotation was incorrectly handled

Now only (and all) new sheet path(s) created have a reference cleared, as expected.
(new sheet paths can be more than one, if the new instance of the sheet has sub-sheets)

Fixes: lp:1789048
https://bugs.launchpad.net/kicad/+bug/1789048
2018-09-09 09:19:22 +02:00
Seth Hillbrand e29e7ff95d 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:41:53 -07:00
Seth Hillbrand fb580d3694 pcbnew: center the zone fill confirmation dialog
The zone fill confirmation should follow the parent dialog.  In the case
of plotting, this is the plot window.
2018-09-08 20:18:14 -07:00
Seth Hillbrand b987126b7d pcbnew: Keep Yes/No dialogs above the windows
Modal yes/no questions should not be allowed to fall behind other
windows.  They need to be answered before the program continues and
clicking outside of the dialog should not hide dialog itself.

Fixes: lp:1790640
* https://bugs.launchpad.net/kicad/+bug/1790640
2018-09-08 20:18:02 -07:00
Seth Hillbrand 3919345003 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:24:44 -07:00
Seth Hillbrand 1df99c264f 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 06:59:36 -07:00
Seth Hillbrand 4d094da2fa Correct previous (2c5154c63) default value 0.1->0.051 2018-09-08 06:45:23 -07:00
Seth Hillbrand 2c5154c630 pcbnew: adjust default soldermask/dam clearance
The previous clearance values were equivalent to the default copper
clearance, which could cause issues for users who didn't adjust the
values and had alignment errors at the board house.  New values default
to typical dry film minimums.
2018-09-08 06:33:07 -07:00
Tomasz Wlostowski f85dc57642 POLY_GRID_PARTITION: fixed incorrect point-in-polygon test in some corner cases
Fixes: lp:1787236
* https://bugs.launchpad.net/kicad/+bug/1787236
2018-09-06 20:55:40 -07:00
Seth Hillbrand 3da86dc24b kicad2step: limit small segment add/remove
The addition of very small segments in OCE triggers sliver
removal/cleanup in the BREP generation that can get stuck in a very long
loop during STEP export of boards.  These were introduced to ensure
closure of boards with small gaps that were too big for OCE to consider
joined.

Removing the small segments allows STEP export to proceed in a
reasonable time.  This also decreases the default minimum gap size that
kicad2step uses to determine curve matching.  This prevents mis-matching
small curves

Fixes: lp:1784626
* https://bugs.launchpad.net/kicad/+bug/1784626
2018-09-06 18:43:26 -07:00
Seth Hillbrand 5e9b4dd6a5 eeschema: Set images to draw first in eeschema
Bitmaps in eeschema are mainly used for referencing and data.  Having
them between functional items obscures the elements.  This places the
images in the background for eeschema as a partial fix for lp:1787404

This commit should not be picked into 5.1 as the canvas changes.
2018-09-06 14:10:11 -07:00
Seth Hillbrand 1f60d8fdbf eeschema: Only allow dragging of draggable items
When expanding the drag item to allow corners, we accidentally picked up
other items in the list.  This limits the items that can be dragged to
only those that are explicitly in the draggable list.

A side effect of this commit is that when converting from move to drag
(with tab), items not in the draggable list will be left in place.

Fixes: lp:1787966
* https://bugs.launchpad.net/kicad/+bug/1787966
2018-09-06 13:42:01 -07:00
Seth Hillbrand 7012226284 pcbnew: Set soldermask on NPTH imported from Eagle
Fixes: lp:1773253
* https://bugs.launchpad.net/kicad/+bug/1773253
2018-09-06 08:57:40 -07:00
Seth Hillbrand 48bbde65b3 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:43:15 -07:00
Damian Wrobel bdcae5f593 Fix setting default cmake build type
Changes: Sets default cmake build type before
calling project(). Current version seems to follow
https://cmake.org/pipermail/cmake/2008-September/023808.html
however, it seems to miss the comment that:
"definition of CMAKE_BUILD_TYPE occurs in the PROJECT() command"
which means that setting cmake build type should happend prior
to calling PROJECT().

Fixes: lp:1785719
* https://bugs.launchpad.net/kicad/+bug/1785719
2018-09-05 08:12:54 -04:00
jean-pierre charras b7b125d83c Eeschema: Fix incorrect parsing of old schematic files (version 2) for HLabels and GLabels 2018-09-03 19:52:22 +02:00
Seth Hillbrand 9eec296b0a 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:43:59 -07:00
Seth Hillbrand ec81f3267f 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:45:26 -07:00
qu1ck f0e9e3b9d5 Extend swig definitions to contain SHAPE_LINE_CHAIN and VECTOR2I 2018-08-31 13:16:13 -04:00
Seth Hillbrand ee12fe6eff modview: Re-instate the try/catch block when loading
Setting up the footprint viewer will attempt to load the current
footprint.  If the library does not exist, the loader will throw an
IO_ERROR that needs to be caught.

Fixes: lp:1789626
* https://bugs.launchpad.net/kicad/+bug/1789626
2018-08-31 08:45:34 -07:00
Seth Hillbrand d6b95236a4 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:00 -07:00
Seth Hillbrand fbe677e46e 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:25:18 -07:00
Seth Hillbrand f84bd0d836 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:07:33 -07:00
Seth Hillbrand 25b6604fc5 pcbnew: Swap all types of zones when swapping layers
This is a 5.0-only commit to implement correct layer swapping.

Fixes: lp:1789390
* https://bugs.launchpad.net/kicad/+bug/1789390
2018-08-30 09:45:39 -07:00
Ronnie Gaensli fbd6654f9a pcbnew: fix pan while moving mouse after cancelling selection box
Fixes: lp:1776648
* https://bugs.launchpad.net/kicad/+bug/1776648
2018-08-29 16:48:55 -07:00
Seth Hillbrand b8ae4e0195 pcbnew: Only dp clearance matrix when routing dp
Fixes: lp:1787766
* https://bugs.launchpad.net/kicad/+bug/1787766
2018-08-29 10:25:51 -07:00
Seth Hillbrand 9527034e0f cvpcb: don't show board-level soldermask
Only show soldermask in cvpcb if it was defined in the footprint or pad,
not the board defaults.
2018-08-28 17:00:27 -07:00
Seth Hillbrand 6754aa8a74 eeschema: Close ERC before placing components
We have a dialog shim that raises the ERC dialog in front of the
schematic frame, which is useful for keeping the ERC dialog visible
during debugging.  But mouse move events do not pass through to the
schematic, resulting in a captured mouse pointer but no drawing updates.

As a work-around we close the ERC dialog while placing new components.
Previous ERC data still exist when the window is launched again.

Fixes: lp:1779851
* https://bugs.launchpad.net/kicad/+bug/1779851
2018-08-28 16:03:02 -07:00
Seth Hillbrand 0c659eda78 gerbview: Add LAYER_SELECT_OVERLAY to GAL
Ensure selected gerbview layers plotted on newly created SELECT layer
2018-08-28 15:12:02 -07:00