This selection improvement feature is hidden behind the advanced
configuration key "PcbSelectionVisibilityRatio". It is turned off (1.0)
by default. Value values are from 0.0 to less that 1.0. From testing,
using a value between 0.1 and 0.3 produces the best results.
This fix uses normal alpha blending described in the link below. The
current design only uses the alpha of the object's color. It could be
improved by doing a full color alpha blending but using the color alpha
alone seems to result in satisfactory results.
https://en.wikipedia.org/wiki/Alpha_compositing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16126
(It's still leaking into BOARD_COMMIT and some other places, but at
least it no longer leaks into all the edit tools.)
Also fixes some bugs when moving/copying/pasting multiple selections
containing length-tuning patterns.
When calculating the viewport extents, we only need the maximum size
that can be represented. Anything larger should be truncated. We do
this in many other places (wx_view_controls, ruler_item,
ds_proxy_view_item, etc) and this brings pcb_selection_tool into
alignment with this, avoiding an unneeded warning message
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15529
(It is a container to build bridges on solder mask layers by DRC, not real zone)
Disable also this special zone selection by adding it in
PCB_SELECTION_TOOL::itemPassesFilter
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME. The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.
Retire FOOTPRINT_VIEWER_FRAME_MODAL. FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
If we have a footprint currently selected and we click on its empty
space again, we deselect the footprint. However, if we click on the
empty space of a different footprint, we will select that footprint
instead.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
- Footprints cannot be selected if they do not have items visible on the
screen
- Clicking on empty space in a footprint will select it if the space is
contained in the visible bounding box
- Clicking on a selected footprint a second time will deselect it
- Clicking on a footprint that has pads selected will still select the
footprint
This avoids having the full footprint bounding box considered when
selecting footprints (useful b/c footprint bbox is often much larger and
unexpected). Also allows non-standard footprints (e.g. silk or fab only
footprints) to be logically selected if the layers on which they have
elements are visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.
The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints. This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.
For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it. IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox. Instead, we
filter footprints based on the hittest of each element. This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.
Add updating of teardrops on BOARD_COMMIT::Push().
Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.