Commit Graph

452 Commits

Author SHA1 Message Date
Seth Hillbrand b31349b679 Get consistent point for gfx import
TopLeftItem() should always return same element for our import

Fixes https://gitlab.com/kicad/code/kicad/issues/13041
2022-11-30 12:25:34 -08:00
Seth Hillbrand cf33f33899 Standardize placement tool modifiers
PlaceImage, PlaceImportedGraphics and PlaceText need to handle the grid
and hotpoint snapping as well as the modifiers to disable them
2022-11-30 10:57:42 -08:00
Jeff Young 074c087c21 Allow disabling of grid snapping while placing imported image.
Fixes https://gitlab.com/kicad/code/kicad/issues/13040
2022-11-30 14:38:22 +00:00
Seth Hillbrand 47d86e5d9e Don't crash when canceling graphics import
Grouped graphics need to have their group removed from the preview
before deleting the elements to avoid reading freed memory when
redrawing
2022-11-23 16:21:06 -08:00
Jeff Young 9724f6e736 Don't allow zone filling during other editing operations.
It's a very heavy op, and is likely to violate all manner of
assumptions the other ops make.

Fixes https://gitlab.com/kicad/code/kicad/issues/12736
2022-11-14 23:39:49 +00:00
Seth Hillbrand 056f45cd70 Fixup most intersecting polygon points
Remaining is the intersecting complex pad, so this keeps the error
message when drawing

Fixes https://gitlab.com/kicad/code/kicad/issues/12806
2022-11-08 16:05:04 -08:00
Wayne Stambaugh 6a0db3e7e2 Fix Coverity warnings. 2022-10-26 14:39:44 -04:00
Wayne Stambaugh 598b09821a Coverity fixes. 2022-10-17 15:30:20 -04:00
Alex 165654f114 Expose Switch Arc Posture in context menu. 2022-10-07 08:28:13 +03:00
Alex d26b59a0bf Improve arc construction using angles from arc geometry manager.
Fixes https://gitlab.com/kicad/code/kicad/issues/11713
2022-10-07 06:51:00 +03:00
jean-pierre charras 5990595619 When adding a bitmap, do not clone it during moving.
Cloning is not necessary, and is memory consuming.
2022-09-19 17:41:47 +02:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Jeff Young d9f75556bd Fix old copy/paste error (from 2017, believe it or not).
Fixes https://gitlab.com/kicad/code/kicad/issues/11487
2022-09-16 11:25:27 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young ce9adeaf51 Don't set FreeVia when we can't find a net.
Fixes https://gitlab.com/kicad/code/kicad/issues/12421
2022-09-15 23:16:08 +01:00
Jeff Young eaccd40c75 Allow vias to connect <no net> tracks even when DRC checking is on.
Fixes https://gitlab.com/kicad/code/kicad/issues/12403
2022-09-12 20:38:21 +01:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Jeff Young 09511d176c Quiet Coverity. 2022-08-26 17:05:25 +01:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Jeff Young 46df421064 ADDED defined pad groups for net-tie footprints
Each pad group is allowed to short nets with other pads in its group.

Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.

DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.

DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.

Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Alex 405be8d15f Bounds-awareness in Move, Rotate, point editor, drawing tool 2022-08-16 12:08:55 +00:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young 54213bb7f1 Cleanup and move to DRC_ENGINE's status reporter.
1) brace formatting
2) get rid of some autos
3) get rid of a dyn_cast that CLion claims is bad
4) use DRC_ENGINE's status reporter
2022-08-01 13:09:51 +01:00
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
Jeff Young 2bf33321d1 Update constraint mode in status bar during move.
Fixes https://gitlab.com/kicad/code/kicad/issues/10465
2022-07-27 18:57:45 +01:00
Jeff Young f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
Jeff Young b80fd5329d Clear dimension pointer after committing.
Fixes https://gitlab.com/kicad/code/kicad/issues/11864
2022-07-22 09:31:09 +01:00
Mike Williams 3669cb4673 PCB Editor: Add User Background Images 2022-07-14 11:23:23 +00:00
Jeff Young e122dc38bd Add context menu item for clearing net highlighting.
In selection tools, drawing tools, router tool, line_wire_bus tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/11920
2022-07-10 17:15:20 -06:00
Seth Hillbrand 0c47a09517 Ensure rectangles are normalized
Normalize on creation and fixup rectangles previously saved with
inverted coordinates

Fixes https://gitlab.com/kicad/code/kicad/issues/11965
2022-07-07 10:40:18 -07:00
Jeff Young 298edb09c3 Initialize TEXT_ATTRIBUTES justifications for text & textboxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11805
2022-06-20 17:03:37 +01:00
Jeff Young 73836b50fc Add proper collision test to via placer.
Also moves DISALLOW constraint processing outside the loop as it
performs it's own loop over any objects referenced by the rules.

Fixes https://gitlab.com/kicad/code/kicad/issues/11832
2022-06-19 21:57:49 +01:00
Jeff Young d40664d171 Handle double-click in dimension drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11815
2022-06-15 18:07:50 +01:00
Jeff Young d31bd4ea3e Use default text properties for textboxes.
Also make sure text is mirrored when placed on back of board.

Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-03 18:48:09 +01:00
Jeff Young 155620cc9a Move H/V/45 mode from zone properties to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
Jeff Young 1fb7532859 Prepare for a more uniform implementation of H/V/45 mode. 2022-05-29 21:30:14 +01:00
Jeff Young 23fb4c7433 Uniformly use a single facility for location-less prime events.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
Jeff Young f2fc78f380 Don't copy modifiers to prime events.
The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
Jeff Young a49bb792bd Insert chevrons when placing vias near tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/10898
2022-04-11 16:26:36 +01:00
Jeff Young 29eb5931c2 Be more careful with forced cursor positions.
Fixes https://gitlab.com/kicad/code/kicad/issues/9977
2022-04-10 23:14:57 +01:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young ec5b7a57ec Consistency in via dimensions terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/11024
2022-03-03 22:40:18 +00:00
Jeff Young d65f9ad2d8 Implement multi-layer stitching via logic. 2022-02-24 21:32:43 +00:00
Jeff Young 369f53bb19 Better DRC checking when placing vias. 2022-02-24 21:32:43 +00:00
Jeff Young 41f6e634c6 Partially integrate grid snapping with constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Jeff Young 50a4d610a6 Be cognizant of flashed layers when generating pad shapes. 2022-02-11 13:10:52 +00:00
Seth Hillbrand 162545ddf0 Validate arc output when editing
Handles checking output of the arc to ensure we don't end up generating
an invalid arc.  Also keeps the limit of the arc angle to be (360,360)
excluding 0.

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

(cherry picked from commit 8fc831cbc2)
2022-02-07 08:55:53 -08:00