Commit Graph

1160 Commits

Author SHA1 Message Date
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
Jeff Young 208622699f Scale zone hit area by zoom.
Fixes: lp:1803362
* https://bugs.launchpad.net/kicad/+bug/1803362
2018-11-17 00:35:07 +00:00
Seth Hillbrand 940353afde GRID_HELPER: Keep edited items out of snap
Distinguish between the snap-from and snap-to items.  Previously, we
used the SELECTED or DRAGGED flags but the flagging arcitecture was
inherently fragile.  This specifies items directly that should not be
used as snap targets.

Fixes: lp:1802795
* https://bugs.launchpad.net/kicad/+bug/1802795
2018-11-16 10:05:31 -08:00
Jeff Young 02a559678a Improve terminology of track selection commands.
There was confusion that "copper" and "net" meant zones, and there
was confusion about what "trivial" meant.

Fixes: lp:1772251
* https://bugs.launchpad.net/kicad/+bug/1772251
2018-11-13 21:29:35 +00:00
Maciej Suminski 361b768aaf Fix frozen cursor on interactive DXF placement 2018-11-13 14:58:54 +01:00
Jeff Young 86273e86b9 Added user and grid origins to Position Relative dialog.
Also fixed a refresh bug when doing Position Relative.

Fixes: lp:1792699
* https://bugs.launchpad.net/kicad/+bug/1792699
2018-11-12 23:09:45 +00:00
Jeff Young 6d76097291 When running selectable() recursively, we're really only checking visibility.
Fixes: lp:1802949
* https://bugs.launchpad.net/kicad/+bug/1802949
2018-11-12 21:59:43 +00:00
Seth Hillbrand c15c64e991 GRID_HELPER: Don't snap to sub elements being moved
Fixes: lp:1802795
* https://bugs.launchpad.net/kicad/+bug/1802795
2018-11-12 06:53:33 -08:00
Jeff Young 62e2fe8bbd Recurse for more detailed selectability tests.
Fixes: lp:1801709
* https://bugs.launchpad.net/kicad/+bug/1801709
2018-11-11 20:26:19 +00:00
Jeff Young befc504734 Warp cursor back to creation point after new-text dailog.
Also fixes same issue for new zones.

Fixes: lp:1802532
* https://bugs.launchpad.net/kicad/+bug/1802532
2018-11-11 20:26:19 +00:00
Seth Hillbrand c24f70ba1e GRID_HELPER: Filter targets based on dragging
Filtering based on selection ignores the use case where we are measuring
to a selected item.  This utilizes the dragged flag to prevent snapping
based on the current state of the item drag.

Fixes: lp:1801089
* https://bugs.launchpad.net/kicad/+bug/1801089
2018-11-11 11:30:36 -08:00
Seth Hillbrand cf20b39ddc GRID HELPER: Consider all snappable items
When snapping, we should allow any point identified as a snappable
point.  The additional consideration for corners might be used for
alignment in the future.

Fixes: lp:1802741
* https://bugs.launchpad.net/kicad/+bug/1802741
2018-11-11 11:30:36 -08:00
Seth Hillbrand 70e660dfe8 GRID_HELPER: Update target geometry when moving
Setting a previously visible item visible is a nop.  If the target was
visible, make sure to update the geometry

Fixes: lp:1802405
* https://bugs.launchpad.net/kicad/+bug/1802405
2018-11-09 06:12:31 -08:00
Seth Hillbrand 4b931aeb57 pcbnew: Force cursor position when snapping
This places the crosshairs (confusingly named here) at the snap
position, either one of the snap points or the grid, depending on the
status of the hotkeys SHIFT/ALT.

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

Fixes: lp:1801369
* https://bugs.launchpad.net/kicad/+bug/1801369
2018-11-07 14:36:46 -08:00
Seth Hillbrand f2ccad39b6 pcbnew: Fix grid snapping for picker
Fixes: lp:1801373
* https://bugs.launchpad.net/kicad/+bug/1801373
2018-11-07 09:03:26 -08:00
jean-pierre charras 15fa8f8a22 Minor fixes. 2018-11-03 14:30:34 +01:00
Jeff Young 569d4a0f64 More selection logic improvements.
Separate out zone edges (which are quite specific, and should
win over most other things) from zone fills (which are pretty
generic and should only be considered when there's nothing else).

Also excludes zone fills when the zones aren't being shown as
filled.
2018-11-02 23:52:00 +00:00
Jeff Young 74118a2e9d Don't display all the footprint info when an edge is selected.
Fixes: lp:1800556
* https://bugs.launchpad.net/kicad/+bug/1800556
2018-10-30 11:33:49 +00:00
Seth Hillbrand 90233e5ec6 SELECTION: Prevent double select/deselect.
When processing the selection filter, items were deselected before being
reselected after passing through the filter.  This adjusts the logic to
only deselect those items that are filtered out.
2018-10-24 17:17:45 -07:00
Jeff Young adfe2fc267 Make sure user isn't surprised by Match All setting.
If they selected the dialog with a footprint selected, they're
probably not expecting Match All.
2018-10-23 20:54:42 +01:00
Jeff Young f17c18bcce Remove AdvanceDepth() hacks in favour of proper layers.
Also removes the bounding-box cache since the last big merge
should have sorted out the Update(GEOMETRY) calls.

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

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

Fixes: lp:1797075
* https://bugs.launchpad.net/kicad/+bug/1797075
2018-10-21 15:55:56 +01:00
Jeff Young a5c892d9cd Update line width each time a new object is drawn.
Fixes: lp:1797481
* https://bugs.launchpad.net/kicad/+bug/1797481
2018-10-18 15:25:56 +01:00
Jeff Young ecd893c4b1 Refresh screen after filling zones.
Previous code didn't refresh until you moved the mouse.
2018-10-16 17:07:59 +01:00
Seth Hillbrand 4460313104 pcbnew: Separating connectivity to subdir 2018-10-12 16:31:09 -07:00
Seth Hillbrand 915d2ed374 pcbnew: Zone tool follows active layer
Refactor the polygon event loop into its parent function to allow access
to the params structure.  Active layer now updates the drawing layer for
add/cutout zones.

Fixes: lp:1797483
* https://bugs.launchpad.net/kicad/+bug/1797483
2018-10-11 21:16:05 -07:00
Jeff Young ab67d2f81a Another go at fixing units changes for rulers.
The previous fix only worked for hot-key changes.  This should
include using the toolbar, menu, etc.
2018-10-10 10:59:50 +01:00
Jeff Young e79e2f0175 Remove properties flag from via placer so single-click mode works.
Fixes: lp:1796769
* https://bugs.launchpad.net/kicad/+bug/1796769
2018-10-10 10:59:50 +01:00
Seth Hillbrand abdb91203f pcbnew: Position relative using pad
Positioning a pad relative to an item in the board edit should move the
footprint not the pad.

Fixes: lp:1796995
* https://bugs.launchpad.net/kicad/+bug/1796995
2018-10-09 22:05:41 -07:00
Seth Hillbrand 9a86b26b82 pcbnew: Distribute footprints not pads
When using the board edit, align tool automatically moved footprints
instead of pads but distribute tool did not.  This standardizes the
behavior.

Fixes: lp:1796997
* https://bugs.launchpad.net/kicad/+bug/1796997
2018-10-09 22:01:23 -07:00
Seth Hillbrand 246f49b8cb pcbnew: Fix Footprint selection to only footprint area
Fixes: lp:1796866
* https://bugs.launchpad.net/kicad/+bug/1796866
2018-10-09 05:53:31 -07:00
Seth Hillbrand e1fe3c7ed4 GRID_HELPER: Remove double-check condition
We only need to check nearest once.
2018-10-09 05:37:48 -07:00
Seth Hillbrand f11cb736e5 pcbnew: Zone selection heuristic continuity for edge
If the user is carefully selecting the zone edge, we do not filter the
zone preemptively from our disambiguation list in the same manner as we
do for selecting on zone copper.

Fixes: lp:1796719
* https://bugs.launchpad.net/kicad/+bug/1796719
2018-10-08 11:31:52 -07:00
Seth Hillbrand 3ee72031a4 pcbnew: Follow cursor when editing polygon
Fixes: lp:1796721
* https://bugs.launchpad.net/kicad/+bug/1796721
2018-10-08 10:32:30 -07:00
Seth Hillbrand 9505df5997 GRID_HELPER: Fix ALT issue with snapping
Disabling the grid should leave the snapping in place.  But our disabler
returned the current point as closest, effectively always ensuring the
cursor position was the closest snap.  This only uses grid when
requested.
2018-10-07 08:23:45 -07:00
Seth Hillbrand ae7f04a20c pcbnew: snap after constraint and grid
This is temporary until we figure out a way to do multiple constraint
handling in GRID_HELPER or the EC_* class.  This will work as long as
the EC constraint helper places the endpoint on either the primary or
aux grid.

    Fixes: lp:1796540
    * https://bugs.launchpad.net/kicad/+bug/1796540
2018-10-07 08:23:45 -07:00
Seth Hillbrand 1ee579c821 pcbnew: Set graphic line width based on layer
Get the board settings when changing the drawing layer.  These include
default line thickness that should be updated.

Fixes: lp:1796489
* https://bugs.launchpad.net/kicad/+bug/1796489
2018-10-06 21:42:25 -07:00
Seth Hillbrand 821b10a37e pcbnew: Drawing tool's crosshairs follow the element
When drawing the crosshair should track the element while the mouse
provides the position to calculate the next snap.

Fixes: lp:1796524
* https://bugs.launchpad.net/kicad/+bug/1796524
2018-10-06 20:27:18 -07:00
Seth Hillbrand 85194989b2 pcbnew: Ensure that dimension tool snaps to anything
The dimension tool is used to measure physical dimensions on the board
therefore it should be able to snap to any other object, not just those
on its own layer set as is the case for other items.

This also deals with a corner snap case for constraints by first
snapping, then constraining, then aligning to grid.  This ensures OoO
for alignment from least to most constraining.
2018-10-06 19:55:20 -07:00
Seth Hillbrand 3b27049f6e GRID_HELPER: filter selected items from snap target
When considering potential targets for snap points, we need to exclude
the currently selected item as this will mean that we always snap to
ourselves when editing an existing item.

Fixes: lp:1796507
* https://bugs.launchpad.net/kicad/+bug/1796507
2018-10-06 19:38:26 -07:00
Seth Hillbrand d669ae043a GRID_HELPER: Standardize grid helper logic to dim
Places dimension tool under same snapping logic as rest of draw tools

Fixes: lp:1796498
* https://bugs.launchpad.net/kicad/+bug/1796498
2018-10-06 09:53:14 -07:00
Seth Hillbrand da3afd4abd GRID_HELPER: Avoid inactive layers when snapping 2018-10-06 09:52:21 -07:00
Seth Hillbrand 776d12c529 GRID_HELPER: Measurement snapping points
Measurements should snap to the points that are used for controlling the
measurement.
2018-10-06 09:29:19 -07:00
Seth Hillbrand f2a49c6bd6 pcbnew: Get anchor from layer when drawing
When drawing segments, the segment will be NULL'd after committing, at
which point we lost our snap layer.  Choosing snap layers from the
current drawing layer is a more robust method.

Fixes: lp:1796467
* https://bugs.launchpad.net/kicad/+bug/1796467
2018-10-06 08:18:31 -07:00
Seth Hillbrand 8c56f5b035 pcbnew: Allow deselection when clicking on zone
Deselection by clicking on a zone makes working with plane zones easier
by allowing the selected item to de-selected by clicking on a zone.
Once the selection is cleared, the zone may be re-selected as normal.
Clicking on non-zone items while a separate item is selected will still
select the new non-zone item without requiring a second click.
2018-10-05 21:20:32 -07:00
Seth Hillbrand 502383b759 pcbnew: Adjust selection behavior in highlight net
Prefer non-zones in highlight net in the same way we do for the
selection tool.  Highlight net just has separate logic and was missed
previously.
2018-10-05 21:20:26 -07:00
Seth Hillbrand 2db3f859f7 GRID_HELPER: Show snap indicator when would snap
This shows the snap indicator even when the item we are snapping to
occurs on a grid point, giving the user an indication that the point is
correctly connected.
2018-10-05 14:33:48 -07:00
Seth Hillbrand ee676b74d5 pcbnew: Move measure tool to common GRID_HELPER
This removes the last of the Magnetize legacy code from GAL,
standardizing the key bindings and magnetic effects in the GAL canvas
2018-10-04 21:31:57 -07:00
Seth Hillbrand 4c6b84bfdb GRID_HELPER: enable/disable grid in editor with ALT
Apply optional grid while editing
2018-10-04 21:31:28 -07:00
Seth Hillbrand 28c19cb613 GRID_HELPER: Allow grid disable
Many items require precise, non-grid movement.  Adding the ability to
flag a non-grid option will permit this behavior.

This is a required precursor commit to fixing lp:1738818 and lp:1771683
2018-10-04 21:23:50 -07:00
Seth Hillbrand f56b5cf7bd GRID_HELPER: Match layer set when snapping
This allows items to snap to multi-layer target anchors such as vias and
through hole pads.
2018-10-04 21:23:49 -07:00
Seth Hillbrand f8f2af774c GRID_HELPER: Fill out remaining anchor calculations
The computeAnchors function is used to find best drag locations for
items being moved.  All movable PCB items should be handled.

Fixes: lp:1794304
* https://bugs.launchpad.net/kicad/+bug/1794304
2018-10-04 20:25:13 -07:00
Seth Hillbrand 853b9d06ad pcbnew: Fix snapping while moving on pads
When requesting to move a footprint based on the pad, the pad layers
should determine the snapping.  This extracts layers from the selected
pad before allowing the filtering for locked pads

Fixes: lp:1787627
* https://bugs.launchpad.net/kicad/+bug/1787627
2018-10-04 15:53:41 -07:00
Seth Hillbrand 1ff9931333 pcbnew: Remove legacy Magnetize() from GAL picker
Magnetic items handled by GRID_HELPER in GAL.  Also includes the
standard keyboard modifier shift to change magnetic items on/off
2018-10-04 15:48:15 -07:00
Seth Hillbrand a4966adb67 pcbnew: Don't call evt->pos for non-mouse events
Since we are handling snapping in the grid helper, we don't need to
enable it in the cursor position return.  This allows the grid helper to
use the frame position while optionally snapping to segments.
2018-10-04 07:29:41 -07:00
John Beard 445a9fa963 Put cursor and pan control in libcommon/tool, enable in Gerbview
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.

The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.

Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
Seth Hillbrand 03e642a8db pcbnew: Implement consistent graphical snapping
This creates a standard snapping framework in the GRID_HELPER class that
allows snapping to items on the same layer as the object being
created/moved as well as consistent toggling of this using the Shift key
modifier.

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

Fixes: lp:1604616
* https://bugs.launchpad.net/kicad/+bug/1604616
2018-10-03 17:23:56 -07:00
Seth Hillbrand f714d2fa64 pcbnew: draw polygon and element previews on layer
This ensures that when starting to draw a zone or graphic element, the
preview is drawn in the same color/on the same layer as the element that
will be created.  Previously, beginning a graphic polygon while a copper
layer was active would result in the preview being drawn in the color of
the active copper layer.
2018-10-03 17:23:56 -07: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
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
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 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
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 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
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
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
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01: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
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
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
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