36 Commits

Author SHA1 Message Date
Seth Hillbrand
750dbe6336 Fix usage of PCB_FIELD( PCB_TEXT& )
Passing a pointer to the CTOR invokes the PCB_FIELD( BOARD_ITEM* ) ctor,
which is not what is intended.  Passing just the reference is better but
still ends up creating a PCB_FIELD class with type PCB_TEXT because it
didn't correctly set the type.  So we need to properly set our type and
our parent, then copy the text attributes over.  We can't use the
default copy operator because this also copies the struct_id of PCB_TEXT

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20875
2025-05-13 17:44:59 -07:00
Jeff Young
3def4afaec ADDED: menu item to control searching of hidden fields.
Applies to both PCBNew & Eeschema search panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20370
2025-04-07 17:00:48 +01:00
Jeff Young
8f40feedbb m_ordinal has no meaning for mandatory fields.
... but it should still be initialised.
2025-02-24 23:42:56 +00:00
Seth Hillbrand
141d50f0c1 Initialize m_orginal 2025-02-24 15:11:08 -08:00
Jon Evans
6be2468e05 Fix uninitialized member in non-user fields 2025-02-24 17:39:38 -05:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
426ac96bb7 ADDED: 'Name' property for fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19706
2025-02-19 23:43:53 +00:00
Jeff Young
3c71e7ab09 Auto-recognize URLs in SCH_FIELD and PCB_FIELD grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17066

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17745
2025-02-19 23:43:53 +00:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Jeff Young
e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +08:00
John Beard
527faddbfd GAL: provide constants for LoD HIDE/SHOW and a scale helper
Saves a mishmash of local HIDE/SHOW defs along with various literals.

Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.

Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
2025-01-02 22:59:31 +08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jon Evans
9b1b318736 REMOVED: Footprint field from footprints
This field was redundant (was generally set to the footprint's LIB_ID)
but also buggy (not guaranteed to contain the footprint's LIB_ID)
and confusing (not a way to change the footprint's LIB_ID).
2024-12-01 15:50:40 -05:00
jean-pierre charras
f2d32b64d6 Pcbnew, Properties panel: mask 2 properties irrelevant for pcb fields.
Color and Hyperlink properties have no meaning for pcb fields, but if set
created unreadable .kicad_pcb files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18368
2024-07-14 11:49:27 +02:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Marek Roszko
96cdfc7fa7 Update equality overloads for C++20
C++20 added new reverse and rewritten candidates. This can confuse the compiler because it'll test both A==B and B==A for overloads.
Because we were defining parent class equality overloads, A==B and B==A was considered ambigious due to both being compatible in casting.

So we needed to add explicit child class equality operator overloads
2024-04-12 23:05:58 -04:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jeff Young
27534074ac Fix errors resulting from FP fields being moved from m_drawings to m_fields. 2024-01-28 11:13:48 +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
9f5e583ced Readability. 2023-10-03 17:14:03 +01:00
Jeff Young
cf22d5b99b Preferences setting for force-show-fields-when-fp-selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-20 18:10:28 +01:00
Jeff Young
c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Roberto Fernandez Bautista
cf0b719a4a Fix some unreachable code msvc warnings 2023-07-16 15:41:05 +02:00
Jeff Young
a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8161

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Jeff Young
dc838bc50f Formatting. 2023-07-07 23:41:58 +01:00
jean-pierre charras
f56ea370be PCB_FIELD::GetCanonicalName() must return the canonical name (not a translation) 2023-06-23 18:48:11 +02:00
Mike Williams
85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams
993bb84240 PCB_FIELD: bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams
b81fcaeaf7 PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
Mike Williams
78f1040f33 PCB Fields: register with properties manager 2023-06-20 18:34:52 +00:00
Mike Williams
6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams
a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Mike Williams
968785382e PCB_FIELD: add new field item similar to SCH_FIELD 2023-06-20 18:34:52 +00:00