Commit Graph

36 Commits

Author SHA1 Message Date
Marek Roszko f53c3f895d pcb_group.h should live in pcbnew 2024-01-08 22:32:18 -05:00
Jeff Young cc721c4907 Improve encapsulation of group internals.
(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.
2023-11-09 14:05:35 +00:00
Seth Hillbrand d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Jeff Young 504652b972 Regularize RunOnChildren() at the BOARD_ITEM level.
BOARD_ITEM sub-classes which don't have children simply don't
overrid it.
2023-10-14 15:04:18 +01:00
Alex Shvartzkop be72e07e61 Introduce PCB_GENERATOR. 2023-10-08 02:41:17 +00:00
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
Jeff Young 40abb013ec Don't consider a group to be on a copper layer.
Its members can be on copper layers, but the group itself isn't on any
layer.

Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes.  (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)

Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
2023-06-20 18:13:21 +01:00
jean-pierre charras 1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02:00
Nimish Telang 8ea357f04d Fix Doxygen directives in numerous headers 2023-03-24 13:02:13 +00:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Seth Hillbrand 259e41be2d Don't add non-groupable items to the group
Things like markers and netinfo should never get added to the group,
even if we are inside the group while adding the items

Fixes https://gitlab.com/kicad/code/kicad/issues/13026
2022-11-28 09:11:20 -08:00
Jeff Young 11dddefd05 Implement GetEffectiveShape for groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/12940
2022-11-18 21:13:23 +00:00
Jeff Young 03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Alex 0fea6f5ac3 Fix selection and entering in nested groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/12586
2022-10-06 21:02:36 +03:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Marek Roszko a8505d9c76 SEARCH_RESULT -> INSPECT_RESULT
To fix the name squatting it's doing for future functionality
2022-07-29 20:01:10 -04:00
Jeff Young 2250211ebf More wxT-ification. 2022-02-09 17:04:32 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 544fa939f8 Lock/unlock group members when locking/unlocking group.
Also moves the stateful selection filter to after the hierarchy filter
since the hierarchy filter might swap a pad selection for a footprint
selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/9255

Fixes https://gitlab.com/kicad/code/kicad/issues/7542
2021-09-27 11:29:52 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jeff Young 09b2db3139 Test for group in footprint was snagging all footprint children.
Fixes https://gitlab.com/kicad/code/kicad/issues/8121
2021-04-06 18:27:43 +01:00
Fabien Corona f428ce03f2 ADDED: pcbnew - stackup / characteristics table 2021-03-13 20:19:46 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Wayne Stambaugh 6ab1144ea3 Fix broken Doxygen comment specifiers.
Please note, ///> is not a valid Doxygen comment specifier.  ///< is the
correct specifier to use for single line or short Doxygen comments.
2021-01-25 07:42:36 -05:00
Dominik Wernberger ac94d72d2d Add more const specifiers 2021-01-12 20:51:31 +00:00
Seth Hillbrand 740df93808 Don't dereference board groups in fp editor
The Footprint editor group resolution should stop at the footprint level
to avoid breaking into groups that cannot be accessed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7049
2021-01-11 14:58:33 -08:00
Wayne Stambaugh f06a5894b3 Header clean up round 3. 2020-12-19 18:29:10 -05:00
Jeff Young d50d1d84da Fix some issue with group in selection logic. 2020-12-01 14:04:01 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Renamed from include/class_pcb_group.h (Browse further)