Commit Graph

1138 Commits

Author SHA1 Message Date
Seth Hillbrand b461fc44ef pcbnew: Ensure source snapping
Choosing the drag origin should not be dependent on the snap settings in
pcbnew.  Snap settings are sensible when you are designating a target
only.  Additionally, when dragging a module, we do not want the
footprint's pads to be used as targets for snapping.

Fixes: lp:1814402
* https://bugs.launchpad.net/kicad/+bug/1814402
2019-02-03 04:23:24 +01:00
Seth Hillbrand 05483a06c6 pcbnew: Re-attach snap options
Snapping to item options were partially disconnected when unifying
framework.  This re-attaches the options and adds the additional option
for graphical items.

Fixes: lp:1801377
* https://bugs.launchpad.net/kicad/+bug/1801377
2019-01-29 13:36:17 -08:00
Seth Hillbrand 184711beb4 pcbnew: Fix via snapping to multiple tracks
Rather than selecting an arbitrary track to snap, we select the closest
track to our point, allowing the via to be placed along the full track
length.

Fixes: lp:1813324
* https://bugs.launchpad.net/kicad/+bug/1813324
2019-01-25 09:13:18 -08:00
Seth Hillbrand 4247e32cd6 pcbnew: Disallow new via where DRC is violated
Prior to placing the via, we check if the resulting via will pass too
close to different nets on different layers.

Fixes: lp:1718827
* https://bugs.launchpad.net/kicad/+bug/1718827
2019-01-23 10:20:59 -08:00
Seth Hillbrand efe880bb79 pcbnew: Fix zone cutout duplication
When creating the zone cutout, we delete the old zone and add a new one
with each cutout.  This requires resetting the source zone and clearing
our previous selection if we would like to continue using the cutout
tool on the new zone.

Fixes: lp:1812339
* https://bugs.launchpad.net/kicad/+bug/1812339
2019-01-23 06:42:07 -08:00
Seth Hillbrand 7551613826 pcbnew: Don't duplicate TOOL_EVENT
There is some odd interaction in the default copy constructor for
TOOL_EVENT using boost::optional under gcc.  Avoid this by explicitly
constructing the event needed for cut

Fixes: lp:1812848
* https://bugs.launchpad.net/kicad/+bug/1812848
2019-01-22 08:36:56 -08:00
jean-pierre charras a1d1354bcc footprint_editor_tools.cpp: Better code in Placepad. 2019-01-21 21:33:37 +01:00
jean-pierre charras 4d88cd3a0a Footprint editor: add missing local coordinate initialization in Add Pad. 2019-01-21 21:03:36 +01:00
Seth Hillbrand 4cf4600a23 pcbnew: Discard delete action when routing
Prevent the action from being handled on the next transition.

Fixes: lp:1810611
* https://bugs.launchpad.net/kicad/+bug/1810611
2019-01-17 19:38:01 -08:00
Seth Hillbrand 5182fe15d3 Minor code formatting 2019-01-17 19:17:34 -08:00
Tomasz Włostowski 9657039af2 pcbnew: multiple fixes concerning track->pad net propagation used by Track/Via properties dialog:
- Added ignore netcode option to CONNECTIVITY_DATA::GetConnectedItems()
- PlaceModule() now ensures the module added to the board (and thus to the connectivity database) has correct bounding box necessary for R-trees to work
- Use recursive connected pad search so that the new net is propagated to all pads

Fixes: lp:1787961
* https://bugs.launchpad.net/kicad/+bug/1787961
2019-01-18 02:53:29 +01:00
Seth Hillbrand 8b5127d9bc modedit: Renumber pads should hold removed numbers
When renumbering pads, you can click on a pad the second time to restore
the pad to its original value.  This did not allow a user to then place
the removed number on the correct pad (assuming a mistake).  This commit
ensures that removed pad numbers are remembered and allow the user to
place in the correct pad.
2019-01-17 09:58:22 -08:00
Seth Hillbrand 6b1b4bb43a pcbnew: Add cursor help to renumber pads
Renumber pads command is abstruse so add a small popup help to guide
users when renumbering.
2019-01-17 09:58:22 -08:00
jean-pierre charras 1c4b0337c2 Footprint editor, GAL mode: add missing initialization of local coordinates when creating graphic items
Fixes: lp:1812233
https://bugs.launchpad.net/kicad/+bug/1812233
2019-01-17 17:59:00 +01:00
Seth Hillbrand e270b5d266 modedit: Mirror custom pads
Fixes mirror command to correctly handle custom pads.

Fixes: lp:1808135
* https://bugs.launchpad.net/kicad/+bug/1808135
2019-01-17 08:55:59 -08:00
Tomasz Włostowski d50bc6a85f EDIT_TOOL: correctly handle locked items in Rotate/Flip/Mirror functions when the selection is already being dragged
Fixes: lp:1812009
* https://bugs.launchpad.net/kicad/+bug/1812009
2019-01-16 17:00:51 +01:00
Seth Hillbrand 0f1a11ef38 pcbnew: Cut only copied objects
Fixes a bug where objects where accessed after being freed by the cut

Fixes: lp:1811456
* https://bugs.launchpad.net/kicad/+bug/1811456
2019-01-11 17:27:29 -08:00
Seth Hillbrand d1b53028a1 Remove errant printf() debugging statement 2019-01-08 17:21:05 -08:00
Seth Hillbrand 994be43782 ratsnest: Calculate ratsnest per pad
The local/dynamic ratsnest needs to calculate on a per-pad basis as the
module is always listed as having a visible ratsnest.  This fixes the
finalized ratsnest viewed when routing as well as the show local
ratsnest regression.

Fixes: lp:1811010
* https://bugs.launchpad.net/kicad/+bug/1811010
2019-01-08 17:19:30 -08:00
Seth Hillbrand b0da1e19ee pcbnew: Don't use frame refresh to update display
Frame refresh in wxWidgets sets the focus back to indeterminate state
and prevents hotkey action until the focus is captured again.  Using
canvas update is the correct method to update the canvas display after
modifying zones/similar

Fixes: lp:1810993
* https://bugs.launchpad.net/kicad/+bug/1810993
2019-01-08 12:38:27 -08:00
Seth Hillbrand a8b3a3cc61 pcbnew: Allow capture of non-highlighted items
When routing in high-contrast mode, the user may wish to place items
that are primarily on a different layer while remaining in high contrast
mode.  This fixes a regression from 4.0.7

Fixes: lp:1804309
* https://bugs.launchpad.net/kicad/+bug/1804309
2019-01-08 11:38:06 -08:00
Seth Hillbrand aeedb3543b pcbnew: Update strings
Moving pcbnew error strings that may be seen by the user to translated
strings.  Strings that denote unexpected cases are moved to debug logs
as they are essentially asserts that should never be shown.  The
exceptions are the messages shown when files are loaded.  All unknown
items should show an error here.
2019-01-02 14:43:55 -08:00
Seth Hillbrand 5c055f3f80 pcbnew: minor text fix 2019-01-02 12:28:09 -08:00
Seth Hillbrand daee58a0ab pcbnew: Do not show dynamic ratsnest after most mods
Marking the selection modified should not show the local ratsnest unless
we are currently dragging

Fixes: lp:1809921
* https://bugs.launchpad.net/kicad/+bug/1809921
2019-01-02 12:27:48 -08:00
Seth Hillbrand 583e0173b9 pcbnew: Fix ratsnest display
Checks for ratsnest enabled prior to calculating and displaying the
local/dynamic ratsnest.  Calls the ratsnest clear from selection clear

Notably, it appears that the tool actions do not chain transitions for
the same event.  So only a single action (first specified) will be
executed when an event fires unless the actions are executed by separate
tools.

Fixes: lp:1809752
* https://bugs.launchpad.net/kicad/+bug/1809752
2019-01-02 11:56:23 -08:00
Tomasz Włostowski c777eac000 eeschema: improved highlighting of PCB->SCH cross-probed components/labels/pins
Fixes: lp:1796990
* https://bugs.launchpad.net/kicad/+bug/1796990
2018-12-24 15:35:25 +01:00
Seth Hillbrand 7e9fee285f pcbnew: Align/Distribute handle locking
This fixes the handling of align/distribute tool when called on locked
items.  Locked items cannot be moved but they may be used for the target
of an align/distribute operation.

Fixes: lp:1808238
* https://bugs.launchpad.net/kicad/+bug/1808238
2018-12-14 16:04:07 -08:00
Seth Hillbrand 0a26388901 pcbnew: Break track in edit mode
Enables the ability to break a track into two segments when operating in
the edit mode rather than in router.

Fixes: lp:1779788
* https://bugs.launchpad.net/kicad/+bug/1779788
2018-12-14 09:59:25 -08:00
Seth Hillbrand 77163e27f0 suppress boost optional compiler warning 2018-12-13 12:43:29 -08:00
Seth Hillbrand 1c99784e92 pcbnew: Locked deletion prompting
Instead of a nag screen for locked items, we allow first the unlocked
items to be deleted and then, with a repeated request, the locked items.

This adds a popup cursor window informing the user of the option for
repeating the delete

Fixes: lp:1806507
* https://bugs.launchpad.net/kicad/+bug/1806507
2018-12-13 12:32:58 -08:00
jean-pierre charras 5f4530493a Make DRC markers always selectable.
Fixes: lp:1808181
https://bugs.launchpad.net/kicad/+bug/1808181
2018-12-13 09:06:38 +01:00
Seth Hillbrand 4ff9d2f5e4 pcbnew: Update Alt Delete Name/hint
Simply calling it Alternative Delete was hiding its behavior. This gives
a descriptive tooltip and command name allowing users to more easily
find the equivalent to the "Ripup" command
2018-12-12 17:23:27 -08:00
jean-pierre charras 85775d522c Fix incorrect include paths
Especially, pcbnew/import_dxf is no longer in use.
2018-12-11 11:32:58 +01:00
Seth Hillbrand d3a67e255d pcbnew: Polygon tool on EdgeCuts adds polylines
Edge cuts are more easily edited when they are polylines not polygons
and this keeps the files backwards compatible with v5.0.x.
2018-12-10 06:10:57 -08:00
Seth Hillbrand 7ed1968f60 pcbnew: Remove corners from graphical polygons
Cherry-picked item from 5.0 allowed this action for modedit but missed
pcbnew.  This allows the same action in pcbnew as well.
2018-12-09 08:14:45 -08:00
Seth Hillbrand 4fc81bb923 pcbnew: Graphic lines snap as single segments
Graphic lines and polygons are drawn to fit specific areas for which it
is helpful to have the endpoint controlled by the cursor even when
constraining the angle.

Fixes: lp:1805502
* https://bugs.launchpad.net/kicad/+bug/1805502
2018-12-08 07:26:58 -08:00
Seth Hillbrand 3d98c82217 pcbnew: Disable capture cursor in measure tool
When starting the measure tool, the cursor should not be captured until
we begin the measurement.

Fixes: lp:1806486
* https://bugs.launchpad.net/kicad/+bug/1806486
2018-12-05 19:59:01 -08:00
jean-pierre charras cc0aa8b928 Gfx import: fix many issues, and add many enhancements.
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.
2018-12-03 15:25:44 +01:00
jean-pierre charras 430c61822d Import svg import code from experimental trunk: convert dxf importer 2018-12-03 13:42:23 +01:00
jean-pierre charras 74a9d5401a Import svg import code from experimental trunk: start point 2018-12-03 13:42:22 +01:00
Wayne Stambaugh 59b0f553e0 Code cleaning. 2018-11-28 09:58:41 -05:00
Seth Hillbrand 4a0467bbd0 Selection: allow optional locked item edit
When looping main, we should not exclude locked items without prompting
the user first.

Fixes: lp:1804979
* https://bugs.launchpad.net/kicad/+bug/1804979
2018-11-25 11:54:29 -08:00
Seth Hillbrand 2cfcb2b9fb SELECTION: Allow RequestSelection() to add items
The client filter might add items in the case where locked pads are
filtered.  We need to handle this case when requesting selection by
adding new items to the m_selection

Fixes: lp:1802686
* https://bugs.launchpad.net/kicad/+bug/1802686
2018-11-25 08:33:49 -08:00
Seth Hillbrand 908c2a37e5 GRID_HELPER: Finish drawing closed path
When we draw a path, we usually want to close the path when clicking on
the end of another line.  This uses grid helper to ensure this
progression happens as expected.
2018-11-24 08:00:11 -08:00
Seth Hillbrand 9955d0beb2 MSW Ratsnest: Force marking ratsnest dirty
When updating the status of the ratsnest, we mark its target layer as
dirty to ensure the revised data are used to draw/clear the ratsnest

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

(cherry picked from commit 50eedcf0b3)
2018-11-23 11:45:29 -08:00
Seth Hillbrand ad9916a93d ratsnest: Fix state issue switching in local tool
The ratsnest layer needs to be always enabled in GAL rather than taken
from the board settings.  This also adds a finalize handler to the
picker tool that allows a picker-caller to perform a specific action
when the picker tool exits.  In this case, we use it to clear the local
ratsnest selections back to the default.

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

(cherry picked from commit c0d9b9ab81)
2018-11-20 20:49:18 -08:00
Jeff Young 5bb5aea936 Don't leave a selection with a deleted item in it.
Fixes: lp:1803730
* https://bugs.launchpad.net/kicad/+bug/1803730
2018-11-19 16:03:30 +00:00
Jeff Young f71998b34e Remove repetitive calls to other cancel operations. 2018-11-19 16:03:30 +00:00
Jeff Young 5b9458f4c2 Don't delegate context menu to Selection Tool.
Our superclass can handle it more correctly (including the Cancel
item at the top).
2018-11-19 16:03:30 +00:00
Seth Hillbrand eb689a5221 Ratsnest: Improve show heuristics
When the local ratsnest tool is used, it should toggle the state based
on the global ratsnest visibility.  After changing state, the layer
cache is marked as well.

Possibly related to lp:1800301

(cherry picked from commit 22fbf30f22)
2018-11-18 20:03:46 -08:00