Mike Williams
c3d952644c
Annotation: fix wrong multi-unit annotation messages
...
SCH_SYMBOL::Unit() is updated when the symbol is on the screen, we need
to get the instance unit so it's right even if it's not being displayed /
has never been displayed.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12050
2022-07-25 18:44:55 +00: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
cb77e68076
Don't assume a SCH_EDIT_FRAME in EE_SELECTION_TOOL.
...
It's also used in the symbol editor.
But in any case, pins of other units have no business being in an
SCH_SYMBOL anyway.
Fixes https://gitlab.com/kicad/code/kicad/issues/12076
2022-07-23 14:28:07 +01:00
Jeff Young
d24e6c3408
Auto-annotate (and then don't re-annotate) power symbols.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11942
2022-07-11 21:46:01 -06:00
Seth Hillbrand
ff54b8c718
Overplot schematic symbol fields and pins
...
In the absence of z-ordering, we need to ensure that pin text and symbol
fields are always visible in plots as they are in the schematic window.
We do this by overplotting the fields/pins when symbols overlap each
other.
This can be removed if/when we implement https://gitlab.com/kicad/code/kicad/-/issues/2211
Fixes https://gitlab.com/kicad/code/kicad/issues/11969
2022-07-05 16:39:53 -07:00
Jeff Young
e4798199c6
Handle alt pins in plot code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11728
2022-06-10 22:38:01 +01:00
Seth Hillbrand
1a70465927
Use instance data to store values
...
Previous use of instance was as an "override" of the default value.
This has changed to be used as the primary storage location for all
values. This means that we cannot clear the instance data when setting
a new value for all instances, instead we have to change the instance
data and the default value is superfluous
Fixes https://gitlab.com/kicad/code/kicad/issues/11439
2022-04-25 12:47:48 -07:00
Jeff Young
160240166c
Cleanup.
2022-04-14 17:09:27 +01:00
Jeff Young
034b57d9c0
When reannotating keep existing prefix in most cases.
...
(Execption is reannotating entire schematic, in which case we reset
all of them.)
Fixes https://gitlab.com/kicad/code/kicad/issues/11379
2022-04-13 23:38:45 +01:00
Jeff Young
8358685920
Dual-purpose IsMovableFromAnchorPoint to keep from moving symbols off-grid.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11360
2022-04-11 12:02:20 +01:00
Wayne Stambaugh
239f0214ac
Eeschema: add support for default schematic symbol instance data.
...
Prior to fixing the schematic file change churn do to instance data
changing to the last selected sheet instance, the symbol instance data
was set rather than empty. This change allows for users to set the
default instance data which is used for every new instance of the
schematic.
ADDED: Default schematic symbol instance data (unit and reference, value,
and footprint fields) can be set to be used as the default settings
for all new instances of the schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11113
2022-04-09 07:49:36 -04:00
Jeff Young
3196857449
Fix incorrectly initialized variable.
...
The SCH_ITEM default is LAYER_WIRE, which we don't want for a symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/11307
2022-04-05 13:57:28 +01:00
Jeff Young
8eb10c41d8
Name any unnamed fields so they don't clobber each other.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10039
2022-03-22 18:08:05 +00:00
Jeff Young
41c0009c51
Off-grid ERC warnings.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10379
2022-03-17 20:23:56 +00:00
Jeff Young
c919817c18
Don't reserve space for private items when autoplacing.
2022-03-06 16:12:49 +00:00
Seth Hillbrand
ac87d5e940
Resolve text when requested
...
Getting resolved text for a symbol should always happen, even if we have
unresolved data in the instances
Fixes https://gitlab.com/kicad/code/kicad/issues/11003
(cherry picked from commit acb5ce7108
)
2022-03-01 15:11:06 -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
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
d1552c3fec
Some more wxPoint removal
2022-01-01 12:11:21 -05:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05:00
Marek Roszko
347e03363a
Convert wxPoint/wxSize starting from EDA_RECT usages
2022-01-01 11:30:33 -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
3d97138d92
Bug fix for dangling symbols on pins.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-07 21:39:06 +00:00
Jeff Young
80d6b9e76d
Tighten up hittesting for symbols and other items.
...
Grid-based accuracy doesn't need to be any larger than 1/2 the
diagonal as we'll snap to one side or the other. And symbols don't
need as much slop as other items since there's plenty of "meat" on
them.
Fixes https://gitlab.com/kicad/code/kicad/issues/9805
2021-11-28 19:03:51 +00:00
Jeff Young
40b4052ad4
Improve text hittesting in schematics.
...
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting. This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".
Fixes https://gitlab.com/kicad/code/kicad/issues/9506
2021-11-01 21:13:12 +00:00
Jeff Young
fe6cb7dbb4
Mirror sheet fields when mirroring sheet.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9479
2021-10-28 21:45:22 +01:00
Jeff Young
b52529521e
Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
...
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01: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
2d72ccb6ae
Simplify dangling end stuff a bit and remove graphic lines from it.
2021-09-24 12:19:27 +01:00
Jeff Young
552f053a55
Remove pins from symbol hit-testing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8508
2021-09-23 22:07:51 +01:00
Jeff Young
3b121359ae
Fix a couple of escape-string issues.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9167
2021-09-14 18:30:19 +01:00
jean-pierre charras
a5560bb5f9
Eeschema, Add new symbol to schematics: update Value and Footprint texts
...
to be currently displayed.
Fixes #9025
https://gitlab.com/kicad/code/kicad/issues/9025
2021-08-25 15:13:40 +02:00
Jeff Young
3bddadc03d
Fix a typo in reference clearing.
...
Also fixes an unrelated bug where all values/footprints were getting
reset rather than just the instance versions.
Fixes https://gitlab.com/kicad/code/kicad/issues/8891
2021-08-22 19:55:20 +01:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
726f4d8016
Fix up some more cases of missing escaping for symbol names.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 16:40:38 +01:00
Jeff Young
fa93c1ec65
Don't include hidden fields in bounding box.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8809
2021-07-22 13:56:09 +01:00
Wayne Stambaugh
cb72da294a
More NULL expunging.
2021-07-16 16:13:41 -04:00
Wayne Stambaugh
9d348d7e6d
Coverity issue fixes.
2021-07-06 13:32:34 -04:00
Jeff Young
2aa2493472
Resolve un-set template fieldnames to empty string.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8699
2021-06-30 13:12:57 +01:00
Jeff Young
b1b4caee6a
Escape "naughty" characters in symbol names.
...
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road. Better
to just escape them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
Wayne Stambaugh
ee3eac325d
Expunge the use of the word part from Eeschema code.
2021-06-15 08:32:11 -04:00
Wayne Stambaugh
71c183d7bb
Rename LIB_PART to LIB_SYMBOL.
2021-06-14 07:11:17 -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
Marek Roszko
4df3cb912d
Remove another leaky wx/log.h header
2021-06-03 08:11:15 -04:00
Jeff Young
2e3860de6f
Naming conventions.
2021-05-05 22:58:40 +01:00
Seth Hillbrand
d934dae21a
null check for non-schematic symbol
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8279
2021-04-22 17:53:45 -07:00