kicad/pcbnew
Seth Hillbrand f3d65b5156 Revise method of selecting footprints in contrast
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
2023-08-01 10:43:13 -07:00
..
autorouter Centralize text size clamping. 2023-06-03 20:29:51 +01:00
board_stackup_manager PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH 2023-07-29 09:43:32 +02:00
connectivity Eradicate a bunch of calls to dyn_cast. 2023-06-25 11:10:07 +01:00
dialogs Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
drc Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
exporters Gerber export X3: fix an incorrect keyword ("route" must be "rout") 2023-07-27 20:11:04 +02:00
import_gfx PCB: abolish TEXT_TYPE::TEXT_is_* 2023-06-20 18:34:52 +00:00
microwave Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
navlib Add 3dconnexion driver version check 2023-07-24 18:09:52 +00:00
netlist_reader Fields: don't unchanged fields as changed 2023-07-31 15:10:30 -04:00
plugins Fix import of legacy stroked zone fill + add parsing of segments fills 2023-07-30 20:56:28 +02:00
python Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
ratsnest Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB.... 2023-07-08 22:50:22 +01:00
router Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
specctra_import_export Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
teardrop Refactor: Move static to be inside ZONE_SETTINGS 2023-06-10 12:03:41 +02:00
tools Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
widgets APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in 2023-07-31 18:40:23 +02:00
CMakeLists.txt Generalise fillet tool 2023-07-12 19:21:26 +01:00
Doxyfile_python
Doxyfile_xml
action_plugin.cpp
action_plugin.h
array_creator.cpp Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
array_creator.h
array_pad_number_provider.cpp
array_pad_number_provider.h Fix typos in pcbnew sub-directory 2022-06-30 09:39:45 -04:00
board.cpp Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
board.h Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
board_commit.cpp More undo cleanup. 2023-07-16 14:43:29 +01:00
board_commit.h Implement undo/redo for footprint children. 2023-07-15 17:37:31 +01:00
board_connected_item.cpp Make pad & via teardrops 1st-class citizens (props of the pad/via) 2023-05-19 18:02:03 +01:00
board_connected_item.h Make pad & via teardrops 1st-class citizens (props of the pad/via) 2023-05-19 18:02:03 +01:00
board_design_settings.cpp When routing, check for board-level clearances 2023-07-24 15:19:21 -07:00
board_item.cpp Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
board_item_container.h Fix typos in pcbnew sub-directory 2022-06-30 09:39:45 -04:00
build_BOM_from_board.cpp Fix a bunch more issues with sheetpaths and allowExtraText. 2023-05-05 17:23:52 +01:00
cleanup_item.cpp Add pad-recombining to FPEditor's Cleanup Graphics. 2022-09-24 19:34:06 +01:00
cleanup_item.h Add pad-recombining to FPEditor's Cleanup Graphics. 2022-09-24 19:34:06 +01:00
collectors.cpp Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
collectors.h Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
convert_shape_list_to_polygon.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
convert_shape_list_to_polygon.h STEP export: in board outlines, export Circles as Cylinders, round 2. 2023-05-16 13:39:16 +02:00
cross-probing.cpp Sch/PCB: allow back-updating schematic fields from PCB 2023-07-31 10:38:43 -04:00
edit.cpp Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
edit_track_width.cpp Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
edit_zone_helpers.cpp More safety around ratsnest state. 2022-11-30 13:00:21 +00:00
files.cpp Be smarter about releasing lockfiles 2023-07-21 15:40:19 -07:00
footprint.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
footprint.h Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
footprint_edit_frame.cpp Fix usage of AUI SetAuiPaneSize() hack in FOOTPRINT_EDIT_FRAME. 2023-07-16 22:29:21 +01:00
footprint_edit_frame.h Naming clarity. No functional changes. 2023-06-05 11:01:10 +01:00
footprint_editor_settings.cpp Prefer MRU path to LastImportExportPath for importing footprints. 2023-07-09 22:28:26 +01:00
footprint_editor_utils.cpp Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
footprint_info_impl.cpp Fields: Description now mandatory 2023-06-20 18:34:52 +00:00
footprint_info_impl.h ADDED: Threadpool 2022-06-24 22:59:24 +00:00
footprint_libraries_utils.cpp Move some MRU paths from app to project. 2023-07-12 17:30:42 +01:00
footprint_preview_panel.cpp Add a "hyperzoom" mode for debugging "up close". 2023-06-20 14:19:21 +01:00
footprint_preview_panel.h Graphical diff for board vs library footprints. 2023-03-10 17:16:40 +00:00
footprint_tree_pane.cpp Footprint Editor: Focus search field when window is first opened 2022-12-20 19:54:02 +00:00
footprint_tree_pane.h Footprint Editor: Focus search field when window is first opened 2022-12-20 19:54:02 +00:00
footprint_viewer_frame.cpp Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
footprint_viewer_frame.h ADDED: Change watcher for libraries 2023-05-31 13:46:00 -07:00
footprint_wizard.cpp
footprint_wizard.h
footprint_wizard_frame.cpp Separate immediate and delayed action dispatch 2023-06-27 00:57:59 +01:00
footprint_wizard_frame.h Rename function in Footprint wizard to prevent impoper override 2023-06-12 23:14:56 +01:00
footprint_wizard_frame_functions.cpp Rename function in Footprint wizard to prevent impoper override 2023-06-12 23:14:56 +01:00
fp_text_grid_table.cpp FP Text Grid: avoid ambiguous fallthrough 2023-06-20 19:23:29 -04:00
fp_text_grid_table.h PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
fp_tree_model_adapter.cpp Add pin/unpin context menu to Symbol Chooser and Footprint Chooser. 2022-09-21 14:45:12 +01:00
fp_tree_model_adapter.h Add pin/unpin context menu to Symbol Chooser and Footprint Chooser. 2022-09-21 14:45:12 +01:00
fp_tree_synchronizing_adapter.cpp Fields: Description now mandatory 2023-06-20 18:34:52 +00:00
fp_tree_synchronizing_adapter.h Treat canvas item as current when tree view contains no selection. 2023-06-04 20:52:12 +01:00
generate_footprint_info.cpp Fields: Description now mandatory 2023-06-20 18:34:52 +00:00
generate_footprint_info.h
graphics_cleaner.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
graphics_cleaner.h Add pad-recombining to FPEditor's Cleanup Graphics. 2022-09-24 19:34:06 +01:00
grid_layer_box_helpers.cpp Replace __WXGTK20__ with __WXGTK__ 2023-04-12 18:57:12 +01:00
grid_layer_box_helpers.h
initpcb.cpp BoardDesignSettings are owned by FOOTPRINT_EDITOR_SETTINGS in the FP Editor. 2023-06-12 10:08:41 +01:00
invoke_pcb_dialog.h Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
io_mgr.cpp ADDED: Initial support for importing Solidworks PCB files 2023-06-19 11:57:33 -04:00
io_mgr.h ADDED: Initial support for importing Solidworks PCB files 2023-06-19 11:57:33 -04:00
kicad_clipboard.cpp Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
kicad_clipboard.h Rename PROPERTIES to STRING_UTF8_MAP for clarity 2022-11-06 11:51:52 -05:00
load_select_footprint.cpp Split StyleFootprints into separate bools for fields vs text & graphics. 2023-07-10 17:15:57 +01:00
menubar_footprint_editor.cpp Show Properties Manager menu entry for FP Editor. 2023-07-01 12:01:35 +01:00
menubar_pcb_editor.cpp ADDED footprint associations dialog. 2023-07-11 14:52:05 +01:00
netinfo.h Fix Doxygen directives in numerous headers 2023-03-24 13:02:13 +00:00
netinfo_item.cpp Fix netnames. 2023-01-27 19:35:41 +03:00
netinfo_list.cpp Coverity fixes and code cleaning. 2023-03-02 09:04:47 -05:00
pad.cpp Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
pad.h Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pad_custom_shape_functions.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
pcb_base_edit_frame.cpp ADDED: Properties panel for schematic editor 2023-06-22 22:32:24 -04:00
pcb_base_edit_frame.h ADDED: Properties panel for schematic editor 2023-06-22 22:32:24 -04:00
pcb_base_frame.cpp Add 3dconnexion driver version check 2023-07-24 18:09:52 +00:00
pcb_bitmap.cpp SCH_BITMAP and PCB_BITMAP: rename m_image to m_bitmapBase. Add more info 2023-04-22 17:28:06 +02:00
pcb_bitmap.h SCH_BITMAP and PCB_BITMAP: rename m_image to m_bitmapBase. Add more info 2023-04-22 17:28:06 +02:00
pcb_dimension.cpp Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
pcb_dimension.h Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
pcb_draw_panel_gal.cpp No point in having a RATSNEST_VIEW_ITEM in FP editor, viewer, etc. 2023-07-08 22:54:14 +01:00
pcb_draw_panel_gal.h Formatting and warnings cleanup. (No functional changes.) 2023-04-16 15:36:21 +01:00
pcb_edit_frame.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pcb_edit_frame.h Naming clarity. No functional changes. 2023-06-05 11:01:10 +01:00
pcb_expr_evaluator.cpp Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
pcb_expr_evaluator.h Cleanup printf bits 2023-04-20 15:19:04 -07:00
pcb_expr_functions.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pcb_field.cpp Fix some unreachable code msvc warnings 2023-07-16 15:41:05 +02:00
pcb_field.h Broaden "Style footprint fields" to cover graphics as well. 2023-07-09 12:45:55 +01:00
pcb_group.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pcb_item_containers.h PCB_FIELD: add new field item similar to SCH_FIELD 2023-06-20 18:34:52 +00:00
pcb_layer_box_selector.cpp Move layer ID to action mapping to PCB_ACTIONS 2023-07-05 11:09:34 +01:00
pcb_layer_box_selector.h
pcb_marker.cpp Rename GetSelectMenuText to GetItemDescription 2023-01-11 22:27:44 -05:00
pcb_marker.h Rename GetSelectMenuText to GetItemDescription 2023-01-11 22:27:44 -05:00
pcb_origin_transforms.cpp Remove bad static_cast. 2022-07-24 23:41:41 +01:00
pcb_origin_transforms.h
pcb_painter.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
pcb_painter.h Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
pcb_plot_params.cpp Re-word `tent vias` value setting in board_setup and plot 2023-07-21 17:56:46 -05:00
pcb_plot_params.h Add settings for plotting PDF property popups. 2023-04-30 18:10:04 +01:00
pcb_plot_params_parser.h
pcb_plot_svg.cpp cli: add an option to the pcb exports for plotting negative svg and pdf 2023-06-07 13:28:52 +00:00
pcb_plot_svg.h cli: add an option to the pcb exports for plotting negative svg and pdf 2023-06-07 13:28:52 +00:00
pcb_screen.cpp Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
pcb_shape.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
pcb_shape.h Broaden "Style footprint fields" to cover graphics as well. 2023-07-09 12:45:55 +01:00
pcb_target.cpp Rename GetSelectMenuText to GetItemDescription 2023-01-11 22:27:44 -05:00
pcb_target.h Rename GetSelectMenuText to GetItemDescription 2023-01-11 22:27:44 -05:00
pcb_text.cpp Fix some unreachable code msvc warnings 2023-07-16 15:41:05 +02:00
pcb_text.h Broaden "Style footprint fields" to cover graphics as well. 2023-07-09 12:45:55 +01:00
pcb_textbox.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
pcb_textbox.h Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation. 2023-05-29 15:29:03 +01:00
pcb_track.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pcb_track.h Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
pcb_view.cpp
pcb_view.h
pcbnew.cpp Fix issues related to the splash screen when no config file found: 2023-06-24 18:09:43 +02:00
pcbnew.icns
pcbnew_config.cpp Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
pcbnew_config.h
pcbnew_doc.icns
pcbnew_id.h Make pad & via teardrops 1st-class citizens (props of the pad/via) 2023-05-19 18:02:03 +01:00
pcbnew_jobs_handler.cpp Command line PCB gerber export fix and improvement. 2023-06-16 07:17:39 -04:00
pcbnew_jobs_handler.h Cleanup jobs handlers (+Fix build) 2023-06-11 00:12:53 +02:00
pcbnew_printout.cpp Commenting and formatting. No functional changes. 2023-03-13 18:29:55 +00:00
pcbnew_printout.h Commenting and formatting. No functional changes. 2023-03-13 18:29:55 +00:00
pcbnew_settings.cpp Split StyleFootprints into separate bools for fields vs text & graphics. 2023-07-10 17:15:57 +01:00
pcbnew_settings.h Move some MRU paths from app to project. 2023-07-12 17:30:42 +01:00
pcbplot.cpp Add settings for plotting PDF property popups. 2023-04-30 18:10:04 +01:00
pcbplot.h Cleanup. No (intentional) functional changes. 2023-06-06 12:30:35 +01:00
plot_board_layers.cpp Pcbnew, PlotInteractiveLayer(): do not print useless info in a PDF plot. 2023-07-04 20:02:28 +02:00
plot_brditems_plotter.cpp Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name 2023-07-25 09:11:55 +02:00
plotcontroller.h Allow plotting of multiple board layers per plot in Python. 2023-02-14 09:49:20 -05:00
plotprint_opts.h Avoid duplicating similar options in print and plot headers 2022-11-12 16:02:24 +01:00
plugin.cpp Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
sel_layer.cpp
toolbars_footprint_editor.cpp Rollback wxChoice -> wxComboBox changes for now. 2023-04-09 23:00:33 +01:00
toolbars_footprint_viewer.cpp Rollback wxChoice -> wxComboBox changes for now. 2023-04-09 23:00:33 +01:00
toolbars_pcb_editor.cpp Fix Search pane not remembering docking sizes and positions 2023-06-11 20:23:24 +00:00
tracks_cleaner.cpp Refine track dangling test. 2023-06-17 22:56:57 +01:00
tracks_cleaner.h
undo_redo.cpp Implement undo/redo for footprint children. 2023-07-15 17:37:31 +01:00
zone.cpp Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
zone.h Revise method of selecting footprints in contrast 2023-08-01 10:43:13 -07:00
zone_filler.cpp Consolidate Maximum clearance calculation 2023-07-26 12:55:48 -07:00
zone_filler.h Fix an edge-case in the spoke genration logic for non-cardinal spokes. 2022-10-01 19:31:47 +01:00
zone_settings.cpp Fix build (broken in 90ff331c) 2023-06-10 14:21:10 +02:00
zone_settings.h Refactor: Move static to be inside ZONE_SETTINGS 2023-06-10 12:03:41 +02:00
zones.h Zones: use metric defaults and limits instead of mixed units 2023-02-11 07:39:29 -05:00
zones_functions_for_undo_redo.cpp More tightening of group parent lifecycles. 2022-11-16 00:42:38 +00:00
zones_functions_for_undo_redo.h Formatting and a bit of cleanup. 2022-10-21 18:41:39 +01:00