Commit Graph

3109 Commits

Author SHA1 Message Date
Jeff Young c3e3f3bcb8 Possible fix for move individually.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16087
2024-01-19 15:13:41 +00:00
Jeff Young 57315dd625 Make sure group children get added to board.
Also fixes a bug where you could import on to an invisible
layer (we now auto-show the layer if you do that).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642
2024-01-18 14:02:43 +00:00
Alex 3eb3fc9d1e Fix PCB arc edit point order. 2024-01-18 13:51:32 +03:00
Jeff Young 97cb15dd47 Make sub menus conditional on them having child items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16631
2024-01-18 00:21:15 +00:00
Jeff Young 455fae45d8 Support point editing of inverted rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16595
2024-01-17 15:27:48 +00:00
Jeff Young df48ebfbe7 Restore preferential selection treatment for silk items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16607
2024-01-17 14:02:43 +00:00
Jeff Young ace4ef7b16 Implement stingy selection mode for tuning patterns. 2024-01-17 00:34:22 +00:00
Jeff Young 322ad1af45 Implement copy/paste for generators.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16613
2024-01-16 23:38:50 +00:00
levanlap2502 faeec25557 Fix fillet lines, when line angle is 0 or 180
Check angle of line before creating Fillet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15966
2024-01-16 13:30:21 -08:00
jean-pierre charras 76bd892f93 Fix not working Duplicate command in FP editor
Fixes #16594
https://gitlab.com/kicad/code/kicad/-/issues/16594
2024-01-16 16:30:55 +01:00
Alex Shvartzkop f99505e190 Fix arc editing bugs when endpoints match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16532
2024-01-16 16:17:45 +03:00
jean-pierre charras 0ac23f9099 FP editor: ensure a newly created pad PTH has a hole.
When a new pad type PTH is created from a SMD pad master , previously its
hole had a null size because the master pad had a null size.
Also allows a HEATSINK pad to be added to a SMD footprint.
2024-01-11 16:27:05 +01:00
Jeff Young cd83dfa831 Stage/add/delete group members when adding/deleting group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16540
2024-01-07 13:39:13 +00:00
Jeff Young 5aae8e2fd0 Code cleanup. 2024-01-04 16:13:42 +00:00
Jeff Young 0b526cca15 Delete tracks when deleting tuning pattern as part of sel. 2024-01-02 18:00:25 +00:00
Ian McInerney 53e16558a5 Refresh appearance panel when appending board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16226
2023-12-31 17:08:09 +00:00
jean-pierre charras b94c941217 Pcbnew, Fp Editor, pad_tool::PlacePad() avoid recreate from scratch a pad
when the previous is not used.
If a new pad is generated, when moving it by arrow creates a new pad for
each move by the current code.
This is not annoying unless the pad number is edited during move.
So, the pad number is now reinitialized only after the current pad is used,
not during the current move.
Fixes #16409
https://gitlab.com/kicad/code/kicad/-/issues/16409
2023-12-30 20:15:31 +01:00
Ian McInerney f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Marek Roszko 9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Ian McInerney d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Jeff Young 6a5adc7646 Record nested footprints for collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410
2023-12-24 19:40:21 +00:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Jeff Young 3f73bbcc4f Don't run keepUpright when not rotating.
For that matter, don't do anything at all for a rotation
of 0 (or a move vector of {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16402
2023-12-22 21:22:36 +00:00
Jeff Young 1f627a3a75 Fix two unrelated bugs in ungroup.
1) Don't double-remove the members from the group.
2) Don't auto-recurse BOARD_COMMIT::Stage for non-modify
changes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16419
2023-12-21 22:47:23 +00:00
Jon Evans b1695add9e Fix warnings 2023-12-19 22:38:34 -05:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Wayne Stambaugh 25c03da5a5 Coding policy and Doxygen comment fixes. 2023-12-18 08:32:41 -05:00
Jeff Young 16c8050f3d Fix event/flag race condition. 2023-12-17 21:55:29 +00:00
Wayne Stambaugh eb3fd10af8 Fix obscured object selection issue in board and footprint editors.
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
2023-12-17 16:43:56 -05:00
Jeff Young 1b0cc82c56 Move a couple of stragglers to BOARD_COMMIT. 2023-12-17 21:01:31 +00:00
Jeff Young a96b7116d0 Make sure de-selected items get redrawn.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16385
2023-12-17 17:59:43 +00:00
Jeff Young b29a56530c Remove undo-of-ungroup hack.
The hack assumed that the parent group would be the first
deleted item of type group in the undo list.  While this
will be true when undoing a user ungroup command, it will
not be when undoing an ungroup side-effect, such as when a
member of a group is deleted during UpdateFromPCB.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16384
2023-12-17 15:35:35 +00:00
Jeff Young 9fb06f95a0 Fix msys2 build. 2023-12-16 16:17:24 +00:00
Jeff Young 66a15f6acf Re-factor frame pointer out of generator API. 2023-12-16 16:11:45 +00:00
Jeff Young ea3c87f243 Move group/ungroup to COMMIT infrastructure. 2023-12-16 14:17:25 +00:00
Jeff Young 1df84f4d92 Move some PCB_GENERATOR special-cases to propMgr listeners. 2023-12-15 21:04:33 +00:00
Jeff Young 4844cffc00 Make sure PCB_GENERATOR's lock status follows their members.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16372
2023-12-15 17:37:36 +00:00
Wayne Stambaugh 8687d5092f String and dialog layout fixes. 2023-12-13 11:49:34 -05:00
Wayne Stambaugh 9d6e9b14eb Fix action tool friendly name string capitalization. 2023-12-13 08:15:19 -05:00
Jeff Young ea67430c49 Cleanup. 2023-12-12 13:57:12 +00:00
Ian McInerney 3c0566d318 Don't allow copying markers
Fixes KICAD-5FQ
2023-12-11 22:22:19 +00:00
Jeff Young e801e793dc Prevent copy-elision issues by using smart-pointer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16335
2023-12-11 16:27:31 +00:00
Jeff Young aa046345eb Add missing case to Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2023-12-07 13:41:24 +00:00
Jeff Young 2661e7a8ee Fix over-zealous copy/paste and add a few more comments. 2023-12-06 13:08:22 +00:00
Alex Shvartzkop 111a8d6ab3 Improve/fix Expand connection for graphics. 2023-12-04 09:52:31 +03:00
Jeff Young 1618beba2c Fill empty zones when auto-fill is on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16234
2023-12-02 20:16:26 +00:00
Jeff Young 6e245d5eb4 Remove special cases for footprint editor. BOARD_COMMIT handles them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16236
2023-12-02 20:06:57 +00:00
Jeff Young b13590f4c0 Use preview items instead of highlightNets & status popup
The router preview item can be specific to the part that is being
tuned, rather than the whole net.  It's also less visually noisy as
it doesn't dim/undim the rest of the board.

Using kigfx preview items for the status keeps us from having a bunch
of focus issues with the status popup window.
2023-12-02 16:15:43 +00:00
Jeff Young a5454cd7c2 Remove group from view when ungrouping.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16197
2023-11-29 18:21:18 +00:00
Jeff Young 2545999b3d Delete shapes re-combined into a pad.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16193
2023-11-29 16:15:31 +00:00
Ian McInerney 188b9f4dd5 Fix append board dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16214
2023-11-29 14:01:13 +00:00
Alex Shvartzkop f84bab00b4 Fix build; renaming. 2023-11-28 22:18:37 +03:00
Alex Shvartzkop 7eb98a9863 Fixes for tuning patterns and router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16160
2023-11-28 20:55:39 +03:00
Seth Hillbrand 75c6b0ab28 Added IPC2581 support
IPC2581 is a modern production file exchange system.  It provides
single-file data output for an entire board including BOM and netlist
information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1954
2023-11-26 15:30:58 -08:00
Jon Evans 37d9b7fac0 Prevent crash if generator exists but has no items
See https://gitlab.com/kicad/code/kicad/-/issues/15366
2023-11-25 16:01:12 -05:00
Jon Evans 1cb1fd3516 Partial revert "Fix commit/view handling when dragging arcs"
Revert unintended formatting changes

This reverts commit f0988c3c5d.
2023-11-25 15:16:57 -05:00
Jon Evans f0988c3c5d Fix commit/view handling when dragging arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16145
2023-11-25 14:55:47 -05:00
Jeff Young df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
Jon Evans 87ba1f7ea0 Fix expand selection for graphic shapes on graphic layers 2023-11-20 16:14:56 -05:00
jean-pierre charras ed1924b975 Pcbnew, place menu: some enhancements:
- move place dimensions to a sub menu (they are not frequently used, and it
reduce the size of the place menu
- add reset drill origin, similar to reset grid origin.
2023-11-20 13:23:16 +01:00
jean-pierre charras ed9dd55fde DRAWING_TOOL::PlaceImportedGraphics() do not add twice items when adding to new group. 2023-11-16 12:53:00 +01:00
Jeff Young b218617469 Honour bounding-hull setting on closed shapes and chained segments.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16092
2023-11-16 09:07:54 +00:00
jean-pierre charras a663dd7ec4 Pcbnew, import graphics: fixes and enhancements:
- fix regression: allow grouping or not imported items
- store more settings in Pcbnew settings: all options are now stored.
- default tolerance to connect items is now 0.01 mm. 1 mm is a too big value,
and can create serious artifacts in imported outlines.
2023-11-15 20:26:05 +01:00
Alex Shvartzkop 05e954ad5d Fixes for length tuning patterns. 2023-11-12 12:17:08 +03:00
Jeff Young 7e46e85c7d Update copyrights. 2023-11-11 15:29:34 +00:00
Jeff Young 3e58425671 Flip rotation angle when board view is flipped.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15954
2023-11-10 22:30:06 +00:00
jean-pierre charras 2f594e441b Fix a compil warning (shadowed variable). 2023-11-10 10:31:40 +01: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
Jeff Young 78e00ade7a Clearer naming. 2023-11-09 14:05:35 +00:00
Ian McInerney dd933b7d0e Update CERN copyrights 2023-11-08 21:34:14 +00:00
Jeff Young 7788c8f21c Fix textbox mirroring and rotation (again).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15576

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14178
2023-11-06 14:03:58 +00:00
jean-pierre charras d90981d981 Pcbnew: fix Swap command that improperly rotates footprints when flipping.
Fixes #16025
https://gitlab.com/kicad/code/kicad/-/issues/16025
2023-11-05 15:09:48 +01:00
Jeff Young ac172b944a Don't get stuck cycling through invisible layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16019
2023-11-03 18:17:36 +00:00
Jeff Young 141b953d12 Show selection before opening menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15922
2023-11-03 12:36:30 +00:00
Jeff Young 7f8e397dfb Behave (or assert) when source or target are null or dirty. 2023-11-01 17:11:42 +00:00
Jeff Young d93bb464bf When garbage collecting locally we also need to clear global references. 2023-11-01 12:47:54 +00:00
Wayne Stambaugh 6183a1e4de Coverity warning fixes. 2023-10-30 09:16:24 -04:00
Seth Hillbrand 6d957e9d65 Don't use KiROUND when we should trunc
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
2023-10-29 10:42:33 -07:00
Jeff Young fc0017fc95 Normalize rects higher up.
We don't want to normalize footprint children to their board-relative
coordinates.
2023-10-29 11:45:16 +00:00
Ian McInerney 171458a27b Introduce action friendly names
Friendly names can be used to display action information that is clearer
in non-hierarchical contexts (e.g. not in menus).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8075
2023-10-27 23:58:29 +01:00
Jeff Young fc4bc10d27 Separate out axes definitions between ModEdit and PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5711
2023-10-25 15:01:36 +01:00
jean-pierre charras 85210e5136 Pcbnew, export component placement: better string in menu (.gbr added).
(Was missing in my commit 5bf241a5)
2023-10-25 13:38:07 +02:00
Jeff Young fca1ad5285 Ask user if they want to delete original items after conversion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15938
2023-10-25 00:11:08 +01:00
Jeff Young 791aa64950 Functionally it's a "reference image".
The implementation happens to be a "bitmap".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15932
2023-10-24 15:44:21 +01:00
Alex Shvartzkop c8b2e2aa07 closestDist_sq should be ECOORD_MAX initially. 2023-10-23 22:18:45 +03:00
jean-pierre charras 4ffa013467 Fix minor compil and Coverity warnings (not initialized vars) 2023-10-23 20:13:46 +02:00
Mike Williams 91b6bb8088 Grid helpers: remove view items on destruction 2023-10-23 09:39:08 -04:00
Alex Shvartzkop 97901c9ac5 Fix footprints being difficult to select in high-contrast modes.
(regression)
2023-10-23 06:09:13 +03:00
Jeff Young ad676e22b8 Don't push a commit we don't own. 2023-10-22 20:35:14 +01:00
Jeff Young b97d8ddef4 Make offset-zone check multi-layer aware.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15916
2023-10-21 15:08:36 +01:00
Jeff Young f18ce8c6de Fix layer handling for create similar zone. 2023-10-20 22:20:30 +01:00
Jeff Young f5e99338a9 Generators should respond to the selection filter that controls their children.
(Tuning patterns to the track checkbox, stitching patterns to the
vias checkbox, etc.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15905
2023-10-20 16:28:05 +01:00
Jeff Young 68a5753c80 Repair Rotate on PCB_GENERATOR items. 2023-10-19 23:34:52 +01:00
Jeff Young 24ddc728e8 Add PCB_ACTIONS::regenerateAllTuning....
... and move GENERATOR_TOOL to RegenerateAllOfType().
2023-10-19 11:20:09 +01:00
Jeff Young 7447700735 Fix typo. 2023-10-19 11:20:09 +01:00
Jeff Young 16ec0faa7a Reduce line-breaking.
Also simplifies handling of generator properties dialogs.
2023-10-19 11:19:57 +01:00
Jeff Young 67f0f6e3b9 Rename class to match current terminology. 2023-10-19 01:31:13 +01:00
Jeff Young b089630b4c Simplify Import Graphics.
Removed no-longer-required differentiation between importing
footprint vs board objects.

Renamed files to match the dialog.

Made Position At and Set Layer optional checkboxes.
Removed Group Items checkbox.  (In the unlikely event that you don't
want a group, do an UnGroup after importing.)

Flattened out labelled-sizers in the dialog.

Removed importers blacklist, which hasn't been active for at least 4
years.

Fixed undo/redo bug that caused items to be no-longer-grouped after
a redo.
2023-10-19 01:31:13 +01:00
Jeff Young e793e30360 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15881
2023-10-17 13:34:58 +01:00