Commit Graph

15269 Commits

Author SHA1 Message Date
Ian McInerney 533d7531a1 Via routing actions need to use int flags
The actions the router uses for via placement can be a combination of
enum values, so the actions must use an int parameter instead of the
enum type.

Fixes KICAD-2DS
2023-06-29 23:21:15 +01:00
qu1ck ec94439df4 Footprints swig API: access shown text in fields 2023-06-29 20:36:27 +00:00
jean-pierre charras 5b42348834 Pcbnew: shows the UUID of a footprint in DIALOG_FOOTPRINT_PROPERTIES.
This is an important property of a footprint, but it is never shown to
a user, although it is used in a lot of cases.
2023-06-29 12:36:20 +02:00
Ian McInerney 30f20a694d Give default parameter to net highlight/selection events
Fixes KICAD-2C7
Fixes KICAD-2C3
2023-06-29 00:17:12 +01:00
Ian McInerney 0de6fb03ba Give updateLocalRatsnest action a default parameter
Fixes KICAD-2BX
2023-06-29 00:17:12 +01:00
Ian McInerney 459e6e192a Give placeFootprint action a default nullptr parameter
Fixes KICAD-2BT
2023-06-29 00:17:12 +01:00
Ian McInerney d923b871d7 Remove group reference when exporting individual footprints 2023-06-29 00:17:12 +01:00
Jeff Young 1411b09178 Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2023-06-27 17:04:18 +01:00
jean-pierre charras af71308184 pcb_parser and pcb_plugin: fix incorrect handling of rotation of PCB_TEXTs
in footprints when the text angle is 0 but the fp orientation is not 0.
It was due to the fact angle 0 is not written in file and use the default
value of the created PCB_TEXT in footprint, that is not always 0
Now the angle is always written in file.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-27 08:53:04 +02:00
Seth Hillbrand f3122184df Remove existing footprint when force-reloading
Needs to clear the existing footprint in ReloadFootprint prior to
loading the new one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15040
2023-06-26 17:04:03 -07:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
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.
2023-06-27 00:57:59 +01:00
Jeff Young 3bdc66d3ed Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14991
2023-06-26 16:59:47 +01:00
jean-pierre charras 7e8070b700 pcb_parser: fix incorrect handling of rotation of PCB_TEXTs in footprints.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-26 11:27:20 +02:00
jean-pierre charras 44810e8c09 footprint reader: fix broken handling of "Keep Upright" option.
texts inside footprints must have this option ON by default.
When disable, the keyword "unlocked" must be in field description.
2023-06-25 12:44:33 +02:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jeff Young 300a60e88e Eradicate a bunch of calls to dyn_cast. 2023-06-25 11:10:05 +01:00
jean-pierre charras 994459fd47 fp editor: fix a crash due to a null pointer when reading a .kicad_mod file
It happens if the footprint has some non mandatory fields (user fields).
2023-06-25 10:16:23 +02:00
jean-pierre charras 1094cc5331 Fix issues related to the splash screen when no config file found:
- do not show it before the application is actually started.
- hide the splash screen before displaying dialogs.
Fixes #15047
https://gitlab.com/kicad/code/kicad/-/issues/15047
2023-06-24 18:09:43 +02:00
Jeff Young b3d7aea4df dyn_cast<PCB_TEXT*> won't find PCB_FIELDs.
We really should get rid of dyn_cast entirely....

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15052
2023-06-24 15:48:57 +01:00
Ian McInerney b8e9544828 Remove temporary footprint from pcb group before deletion
Bounding box computation uses a temporary footprint, but the clone
operation keeps the group information. We can't delete a footprint if it
has group information, so just delete the group information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14909
2023-06-24 00:04:06 +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
jean-pierre charras d8034b9c15 Revert "PCB Fields: save untranslated names"
This reverts commit b47fcac666.
The root issue was a bug in SCH_FIELD::GetCanonicalName(), now fixed.
2023-06-23 17:48:19 +02:00
Mike Williams b47fcac666 PCB Fields: save untranslated names 2023-06-23 09:18:55 -04:00
Tomasz Wlostowski 61391e3984 router: take holes into account when building the restricted items set for collision search 2023-06-23 14:52:45 +02:00
Jon Evans 7804c2177c Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
2023-06-23 08:09:53 -04:00
Jon Evans 504e02192c Relax handling of duplicate netclasses in Altium parser
There are some "good" boards that have this for some reason
2023-06-23 08:09:53 -04:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans 39073642a7 Properties: disable pad y-size when circular
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038
2023-06-22 19:19:33 -04:00
Tomasz Wlostowski a0a68d198c router: when no collision search context is provided, assume differentNetsOnly is true 2023-06-22 23:52:21 +02:00
Tomasz Wlostowski bd5954242e router: provisional fix for 14926 2023-06-22 16:52:34 +02:00
Wayne Stambaugh a5411218a2 Fix minor board file white space formatting issue. 2023-06-21 13:42:24 -04:00
Jeff Young 0fde88eefc Protect custom rule function caches from transient items. 2023-06-21 18:14:41 +01:00
Jeff Young 94a23971cc Performance improvements. 2023-06-21 17:00:32 +01:00
Kuba Sunderland-Ober b60f7d4136 Make comparison operators const. 2023-06-21 08:49:26 +00:00
Mike Williams fa84575510 FP Text Grid: avoid ambiguous fallthrough
Works, but bug-prone and suspicious looking.
2023-06-20 19:23:29 -04:00
Ian McInerney f14feafc6b Convert selection vector to EDA_ITEMS for base tool call
The base tool expects a generic EDA_ITEMS, but the existing vector
doesn't easily cast, so add a temporary one.
2023-06-20 21:52:50 +01:00
Ian McInerney f899d9676f Remove unneeded parameter from tool call 2023-06-20 21:52:50 +01:00
Ian McInerney 0a3b6c2d23 Fix call to properties when editing newly placed dimension
The edit is intended to be on the newly placed dimension, but the actual
properties tool doesn't take an item, so it was always looking up the
item to edit using the current selection/cursor position. Make this more
robust by just calling the edit properties directly on the item.
2023-06-20 21:52:50 +01:00
Ian McInerney 3c24ddd8cc Fix passing CLIENT_SELECTION_FILTER through the tool framework 2023-06-20 21:52:50 +01:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Ian McInerney 3718ecfcd8 Simplify forcing action parameters to have a specific type 2023-06-20 21:52:50 +01:00
Ian McInerney 07cc85e76c Fix more places where casts into RunAction were happening 2023-06-20 21:52:50 +01:00
Ian McInerney 8f3d159905 Update the net highlight action to properly use the action parameters 2023-06-20 21:52:50 +01:00
Ian McInerney 8b833211b5 Add parameter to repair board action
The tool checks for a boolean action, so default to giving false (which
makes it run in interactive mode).
2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
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.
2023-06-20 21:52:50 +01:00
Mike Williams 1d26b454f4 SCH -> PCB Fields: bump file versions 2023-06-20 18:34:52 +00:00
Mike Williams 86e0e1cccb PCB, Change Footprint: actually update text attributes 2023-06-20 18:34:52 +00:00
Mike Williams a24c55affe PCB Fields: fix up python, API
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams 85c633eb00 QA: PCB Fields bug fixes 2023-06-20 18:34:52 +00: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