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
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
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
* 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.
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
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.
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)
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)
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)
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
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
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
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.
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.
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
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
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
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.
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
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
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
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.
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
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
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.
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.
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
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
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
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.
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
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.
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
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
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
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.
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.
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
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
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.
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
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