The footprint viewer isn't an edit frame, so we need to access the
settings through the base frame type instead. Also, double click makes
no sense in the footprint viewer, and just leads to weird results
sometimes.
Fixes Sentry KICAD-7A2
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