548 Commits

Author SHA1 Message Date
Damjan
c6e049df2a Pcbnew: isDrag detection in Table creation tool
Drag breaks the UI when in the create table action

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19767
2025-01-29 01:25:37 +00: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
Jeff Young
753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
Jon Evans
196368eb86 CHANGED: Drawing tools can disable H/V/45 snap with Ctrl key
Also disable 45-degree snapping for rectangle shapes; it is
not very intuitive to be limited to drawing squares when this
setting is on.
2024-12-02 12:04:42 -05:00
John Beard
dad07f590a Pcbnew: bezier tool fix width on subsequent curves
This got broken by the changed start logic in a3f239ce5e.
2024-11-28 20:18:00 +08:00
John Beard
a3f239ce5e Bezier: improve double click action
Act more like the line chain tool - a doubleclick finishes
the current curve and resets into non-chained mode
to start again.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19204
2024-11-28 04:36:12 +08:00
John Beard
6bd69a3f77 Bezier/line: add delete last point to context menu
These tools support this action, so add to the menu to make it
more discoverable that the actions exist.
2024-11-28 04:36:12 +08:00
John Beard
f15c5ccfdc Pcbnew: beziers - distinguish cancelled from reset on Esc
When pressing escape, act like the line tool, with two possibilities:

* The current bezier isn't "started", in which case, cancel out of
  tool entirely.
* The current bezier is "started", in which case cancel it, but
  stay in bezier mode to draw another one from a new starting position.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19206
2024-11-28 04:36:12 +08:00
John Beard
d973fd723e Pcbnew: add an arrow change action to the menu when drawing an arrow 2024-10-30 21:22:37 +08:00
jean-pierre charras
e8d89b1327 Fix compil warnings 2024-10-13 17:28:44 +02:00
Jon Evans
2a605e4a4e Infrastructure and file format for via stacks 2024-10-06 18:45:25 -04:00
John Beard
3f131e2011 Abstract REFERENCE_IMAGE to a separate class
Break the non-PCB-specfic parts of PCB_REFERENCE_IMAGE out
to a common REFERENCE_IMAGE class, which is then composed into
the PCB_REFERENCE_IMAGE. This will make it easier to bring the
transform origin logic to eeschema without repetition.
2024-09-30 10:20:20 +01:00
John Beard
b3248095e8 Pcbnew: add bezier editing tool
Adds the initial implementation of bezier overlay
(assistant) and geometry manager. This is only
implemented in Pcbnew - the code is common, but
eeschema doesn't currently use it for any shape.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 21:41:32 +01:00
Seth Hillbrand
c736904e39 Use arrow not pencil when selecting image
The arrow cursor makes better syntactic sense for placing existing items
rather than drawing as is the case for other tools

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17588
2024-09-13 16:52:18 -07:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
John Beard
9fac24fa0f Pcbnew: set mirrored when creating on back layer
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18643
2024-09-06 20:56:33 +01:00
Mike Williams
2c99bc6c6d new feature: Schematic Design Blocks
Added to advanced config, default to off.
EnableDesignBlocks=1 in kicad_advanced to test

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2263
2024-09-05 08:35:49 -04:00
Jeff Young
94f995c49e Reduce dependency on dynamic_cast.
(Especially where it is no-worky on MacOS.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17245
2024-09-04 17:24:49 +01:00
Jeff Young
535aca7a8d Remove redundant tooltips.
Also fixes grammar and capitalisation in a few tooltips.

Also standardises some terminology, such as
"Add" vs "Draw"/"Place" and "Assignment" vs "Association".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17694
2024-08-18 17:18:07 -06:00
Jeff Young
cbfd6ec9ea CHANGED: remove single layer restriction for uvias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18501
2024-08-15 16:42:57 -06:00
Tomasz Wlostowski
9963b9dd9f TOOL_INTERACTIVE: only create the context menu when we are running in GUI mode
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless  mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
2024-08-13 22:50:26 +02:00
Jon Evans
960a9ef7d5 Fixes for snapping in free via placer
Support snapping to graphics at all
Don't skip snapping to pads with no net
Treat placing vias as placing tracks for magnetic settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9024
2024-08-11 08:52:18 -04:00
Jeff Young
1f0ce80f49 Don't commit properties if we're in a drawing operation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18018
2024-07-22 16:28:25 +01:00
Seth Hillbrand
c0bf866c58 Speed up shutdown
When shutting down, we shouldn't need to do a lot of things like
resyncing the PNS world multiple times that can really slow down the
process
2024-07-05 11:16:20 -07:00
Jon Evans
c70ef36739 ADDED: Opacity control for filled graphic shapes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18253
2024-06-26 22:29:58 -04:00
Jon Evans
aaf3142e9a Fix broken hit test for arcs in via placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844
2024-05-18 13:12:12 -04:00
Jeff Young
58ddffe3dd Improve consistency in free-via ambiguity tests.
Also removes a magic number.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17671
2024-05-01 10:24:34 +01:00
Jeff Young
85a9d9e9ec Don't push commit in DIALOG_TABLE_PROPERTIES if table is new.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17688
2024-04-29 17:10:29 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
978ef352d0 Support legacy Length Tuning Settings workflow.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17748
2024-04-24 10:51:25 +01:00
jean-pierre charras
3f24e0eb09 minor compil warning (unused var) 2024-04-04 09:52:28 +02:00
Jeff Young
43edc2eaf8 Don't start immediate mode when there's no event position.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17332
2024-03-31 12:59:52 +01:00
Jon Evans
af18e06ea4 Remove the "insert chevron" function of the via placer
This behavior is generally undesirable and was only needed
because of past limitations.  Now we only split a track
when the user places a via directly on top of it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16456
2024-03-23 14:28:21 +00:00
Jeff Young
ccfefc3971 Table support for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17333
2024-03-11 17:46:09 +00:00
Jeff Young
1bf24da385 Schematic editor Table Properties and commenting for QuasiModal usage. 2024-03-10 12:18:50 +00:00
Jeff Young
f341ab9b00 Bug fixes for flipping tables.
Also adds support for tabbing between table cells in the
table editor dialog.

Also adds support for calling the table editor dialog from
edit properties on a table selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17337
2024-03-09 22:18:19 +00:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young
ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
Jeff Young
e7f18e7eab Warp after context menu only if actively drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11080

(cherry picked from commit 1a7152d3eb99ed9a1f7d250e43dbcb1f25e62899)
2024-02-23 16:53:32 +01:00
Alex Shvartzkop
f1caa262a6 Separate actions for single track and differential pair length tuning. 2024-02-08 14:58:28 +00:00
Jeff Young
ade987c101 Fix logic errors in undo while drawing rectangles.
Draw 2 rectangles.  Start drawing a third, but don't
complete.  Hit Ctrl-Z instead.  Boom.
2024-01-27 21:18:50 +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
Jeff Young
9fb06f95a0 Fix msys2 build. 2023-12-16 16:17:24 +00:00
Jeff Young
ea3c87f243 Move group/ungroup to COMMIT infrastructure. 2023-12-16 14:17:25 +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
df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00: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
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
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
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