Commit Graph

200 Commits

Author SHA1 Message Date
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young 45393f228a Promote pin selections to symbols when preference is set.
Also make additional line slop zoom-relative.

Fixes https://gitlab.com/kicad/code/kicad/issues/12034
2022-07-19 10:31:49 +01:00
Jeff Young dbbdc9d2e6 Don't rely on the penWidth already being set when setting the dash style.
Fixes https://gitlab.com/kicad/code/kicad/issues/11908
2022-06-29 07:34:45 -06:00
Jeff Young d5a6452934 Get rid of special default line style for Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/11882
2022-06-27 19:12:45 -06:00
Jeff Young 036d283433 Don't muck with linestyle default when setting it.
Fixes https://gitlab.com/kicad/code/kicad/issues/11520
2022-05-02 17:22:13 +01:00
Miklós Márton 7ebdb4853c Do not open label edit dialog when adding label to an already named wire 2022-05-02 08:42:15 +00: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 e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young 38cde901b0 Don't use last-resolved caches for graphic lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/11127
2022-03-14 00:31:56 +00:00
Mike Williams 5503afc09a Schematic: disallow center rotation, allow both endpoint rotations
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.

We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
(cherry picked from commit 7d4cb91f39)
2022-02-28 08:50:12 -08:00
Jeff Young f11b8011cd Separate plotting into background and foreground.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-10 20:33:06 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Jeff Young f310a5b986 Excise deci-degrees from trigo. 2022-01-18 11:44:55 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Marek Roszko ac715d2e51 Scoop up some more wxPoint instances 2022-01-03 20:00:53 -05:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 889970a449 SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
2021-12-24 16:13:27 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young 2e342ed8c9 Draw dangling symbols on a separate layer.
This allows us to draw them in front of wires, pins, and most
importantly, junction dots.

Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-06 18:50:50 +00:00
Jeff Young 75d750a3cb Copy lastResolved stuff when pasting.
This of course assumes the paste came from the same document.  If not
then pasted items will get default lastResolved stuff.
2021-11-28 17:09:24 +00:00
Jon Evans 08cb573e11 Do not propagate bus entries across buses and wires at the same point
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9678
2021-11-25 13:36:30 -05:00
Jeff Young 5d751bef74 Be cognizant of connectivity dirtiness when cloning wires.
While the root case is wires, it really applies to all SCH_ITEMs.

Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-25 01:24:35 +00:00
Jeff Young 7fc04c3cf2 Fixes for realtime connectivity being off.
Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-24 13:20:44 +00:00
Jeff Young 025d9f82ea Remove atrophied schematic default wire and bus widths.
(They're now in the netclasses, and specifically the default netclass
if no other netclass is assigned.)

Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-13 22:56:50 +00:00
Jeff Young 1e151b1bcb Fix effective pen width when plotting wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/9625
2021-11-12 16:27:55 +00:00
Jeff Young 996a5b85a6 Overhaul IsJunctionNeeded logic to support all the different cases.
Several clients were using this with different needs.  The API is
now more explicit (and there are more options under the hood).

Fixes https://gitlab.com/kicad/code/kicad/issues/9518
2021-11-04 12:57:16 +00:00
Seth Hillbrand 52bbfb9109 Remove dependency of dot size on linear mils
Changes a dot to be a square pixel (linewidth x linewidth).  This allows
the removal of IU dependencies and ensures that a dot is always visible
on screen.  Also makes sure that cairo is setting the current linewidth
during its stroke routines

Fixes https://gitlab.com/kicad/code/kicad/issues/9362
2021-10-10 09:40:26 -07:00
Jeff Young f73042fe24 Some minor performance enhancements. 2021-09-28 14:28:35 +01:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00
Jeff Young 0dc585e518 Use different dangling state initialization for wires and graphic lines. 2021-09-25 00:34:51 +01:00
Jeff Young 1b8506c6b6 Default dangling state to true. A wire on it's own is dangling. 2021-09-24 20:59:37 +01:00
Jeff Young 7901d705ba Fix optimization to not fetch all possible endpoints for non-connectable. 2021-09-24 20:08:42 +01:00
Jeff Young 2d72ccb6ae Simplify dangling end stuff a bit and remove graphic lines from it. 2021-09-24 12:19:27 +01:00
Seth Hillbrand 71602475eb Allow rotate/mirror even when dragging
Keeps the lines connected but doesn't solve the crossed-wire mixups.
This allows common usage (mirroring labels/rotating segments) and leaves
prevention of the crossed wires to the user.

We can't really prevent crossed wires when rotating e.g. a part with
wires connected to 4 sides and users will not expect that.  But we
should not disable useful features like mirroring multiple parallel
items to avoid a known impossible situation

Also provides an alternative solution to 345f506f0c that allows us to
rotate groups without destroying connections on hover

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8523
2021-09-23 14:47:49 -07:00
Jeff Young ec2ac181a2 Further simplify selection logic.
The select-single-wire stuff is no longer needed, and the prefer-wire-ends
stuff needs to be distance-based.

Also improved wire hit-testing to include bubbles the size of the dangling
symbol at each end.

Fixes https://gitlab.com/kicad/code/kicad/issues/9187
2021-09-21 20:27:35 +01:00
Jeff Young 5c07441e24 Remove Setup Dialog assignment of netclasses to buses.
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.

Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).

Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.

Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.

See additional comments in the bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 22:01:17 +01:00
Jeff Young cc14dfe3ca Make canvas netclass assignment mirror Setup Dialog assignment.
While it would make more sense to have them both use the old canvas
algorithm (of only assigning to the members), I'd be *very* hesitant
to change the Setup Dialog and underlying machinery this late in the
6.0 release.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 14:40:12 +01:00
Jeff Young 69fac89e86 Fix some issues with incorrectly scaled defaults given in mils. 2021-08-25 20:04:06 +01:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +00:00
Jeff Young 1641d6da79 Go back to separate junction logic for wires and buses.
Also makes sure we don't add wire width in to hit-test calculations.

Fixes https://gitlab.com/kicad/code/kicad/issues/7951
2021-03-18 18:32:01 +00:00
Jeff Young 999477e0ed Vastly simplify the needs-junction logic to try and make it less buggy.
Fixes https://gitlab.com/kicad/code/kicad/issues/7951
2021-03-18 16:38:48 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00