Commit Graph

164 Commits

Author SHA1 Message Date
Jeff Young 6fbbf981f0 Handle justification when hit-testing fields.
This steals the algo used in SCH_PAINTER to get the right coords
for the text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15722
2023-10-03 14:36:13 +01:00
Jeff Young 003acbd686 Clear render caches before plotting.
Also fixes a bug where text variables in LIB_TEXT weren't getting
expanded when plotting.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15765
2023-10-02 15:39:14 +01:00
Seth Hillbrand 12ebb2bbfa Set pinmap after updating pins
When duplicating and existing symbol, we must set the pins before
setting the lib symbol as the lib symbol will generate a pin map that
will be broken by the shift to new pins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15728
2023-09-26 11:31:16 -07:00
Seth Hillbrand bdb7b99fc8 Don't destroy the pin cache in symbols
SCH_PIN pointers are used through KiCad and removing them without a
global refresh risks crashes.  A safer approach is to simply reuse the
SCH_PIN structures, updating the data to the revised library

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15715
2023-09-22 11:28:30 -07:00
jean-pierre charras d02ca968d1 Eeschema: fix crash if using ${FOOTPRINT_NAME} or ${FOOTPRINT_LIBRARY} as values
in fields, if no footprint defined for the symbol.
Fixes #15676
https://gitlab.com/kicad/code/kicad/-/issues/15676
2023-09-18 09:12:12 +02:00
Alex Shvartzkop ff49d5ada9 Fix ambiguous overloads on wx 3.3 2023-09-14 19:05:46 +03:00
Jeff Young d74e9ba040 Support SHORT_NET_NAME(pin_number) and friends on symbols.
While it's of debatable use in the schematic, some users want to
author them there so that they're then copied onto the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15544
2023-08-30 11:43:35 +01:00
Jeff Young 9fae110031 Make sure copied SCH_PINs get their LIB_PIN pointers set.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15536
2023-08-29 12:29:41 +01:00
Jeff Young 4325f4e038 ADDED: alternate pin functions in context menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12852
2023-08-28 12:51:41 +01:00
Mike Williams 1c52a60270 Symbol Fields Table: API cleanups for non-modal window 2023-08-14 14:19:26 -04:00
Mike Williams ab1dccd6b3 Symbols: remove dead code 2023-08-09 14:32:06 -04:00
Mike Williams bdecdce1b4 Exclude from Sim: move from field to attribute 2023-08-08 12:36:36 -04:00
Mike Williams 8fb316f995 Symbols: add ${EXCLUDE_FROM_SIM} variable to match the other attributes 2023-08-01 14:33:30 -04:00
Mike Williams b34309fdba Schematic: display symbol's user-defined description in message panel
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15298
2023-07-31 11:22:09 -04:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
jean-pierre charras 58a9b75883 Eechema: Do Not Place markers: add a specific setting for their color.
Previously, the color was the ERROR ERC marker color.
Now they have a specific color.
2023-07-16 20:46:30 +02:00
Jeff Young 5bca002567 Swap non-temp and non-edit flags for SCH_ITEMs.
This is required to keep selected and brightened state across undo.

It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED.  FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags.  But that seems like a risky change....

Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
2023-07-08 18:37:47 +01:00
jean-pierre charras bc8cc826cc Eeschema, PlotInteractiveLayer(): do not print useless info in a PDF plot.
It makes this info more easily readable.
- Remove duplicate properties/fields
- Do not plot empty properties/fields
2023-07-05 11:08:25 +02:00
Youbao 4cb993d872 ADDED: Cadence Allegro PCB Designer netlist exporter 2023-06-28 22:47:30 +00:00
Jeff Young e7ee6e1f26 Modified flags are handled by SCH_COMMIT. 2023-06-25 16:01:35 +01:00
Jon Evans d4b7144448 Properties: expose symbol attributes
Flip polarity of exclude-from-BOM and -board for symbols
to match that of footprints and match the GUI display.
2023-06-24 22:03:06 -04:00
Jeff Young 237cc7eee1 Move TestDanglingEnds() to SCH_COMMIT.
Also fixes a bug where Convert Symbol wasn't undoable.

Also cleans up some SetModified() call no longer needed with SCH_COMMIT.

Also fixes bug where revert of a modification didn't update the screen's
RTree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030
2023-06-23 19:59:46 +01:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jeff Young a3f62cc8de Don't presume a sheet-path while reading files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14920
2023-06-12 13:42:15 +01:00
Jeff Young 5114d3b8c3 Don't use GetValueFieldText from within text var resolution.
(It resets the recursion checker.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14815
2023-05-25 14:34:20 +01:00
Mike Williams 9f62e88477 Symbol Fields Table / BOM Export: handle variable resolution 2023-05-08 10:59:13 -04:00
Mike Williams 5d116245c6 sch_symbol: always require sheet path for text variable resolution 2023-05-06 14:30:06 -04:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Wayne Stambaugh fb6b8eaeea Don't include power symbol pin when exporting netlist.
The netlist exporter was never updated to exclude symbols that are
tagged as power symbols.  Only the legacy power symbol name prefix
('#') was used as the power symbol check.  Power symbols no longer
require the '#' name prefix.
2023-05-05 08:53:29 -04:00
jean-pierre charras 096af19d9a Minor fix and cosmetic change:
- SCH_SYMBOL::GetMsgPanelInfo(): slighly change the displayed lines to allow
longer strings in Description and Keywords
- panel_setup_rules_help.md: fix incorrect html link (URI), creating ERR 404
2023-04-30 17:37:30 +02:00
Jeff Young d4b4abd001 Apply symbol attributes from base symbol, not derived symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/13740
2023-04-15 17:47:32 +01:00
Jeff Young ea59d583d5 ADDED exclude-from-simulation property to text items and textboxes. 2023-04-09 19:03:36 +01:00
jean-pierre charras 8b144539e8 DIALOG_LABEL_PROPERTIES, add global label: better filtering of candidates.
The list of candidates (names) must be restricted to existing global labels
and symbols creating a global net name: power symbols having only one power
input pin (a power output does not create net name).
Fixes #14319
https://gitlab.com/kicad/code/kicad/issues/14319
2023-03-16 15:31:39 +01:00
Jeff Young c266913ec7 Swap pins for undo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14100
2023-03-14 11:52:23 +00:00
Mike Williams ade29c8577 Schematic Sheet Variables: more SCH_SHEET_PATH plumbing
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14239
2023-03-10 09:16:53 -05:00
Mike Williams c8fdac7abe Schematic: correctly resolve global power nets using sheet variables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7445
2023-03-08 11:52:43 -05:00
Jon Evans 7b3fd2113c Improve sheet rendering performance
- Cache font markup parsing
- Cache SCH_SYMBOL::GetOrientation
- Don't construct new strings each time in GetDefaultFieldName
2023-03-05 17:41:46 -05:00
Jeff Young 2973d292d9 Handle alternate pin definitions when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14122
2023-03-03 10:57:37 +00:00
Jeff Young c06cea2fe9 Fix units for ":power" operating points. 2023-02-25 23:30:01 +00:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Jeff Young bc108023b3 ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
2023-02-11 21:11:07 +00:00
Jeff Young 2a5bb71fbd ADDED operating point text variables for labels and symbols.
ADDED formatting for cursors and operationg points

Also fixes a bunch of bugs to make the new cursors work with .ac sims.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6965
2023-02-11 21:11:07 +00:00
Graham Keeth 4a0a5f2265 Fix backwards display of ${DNP}
${DNP} displayed "DNP" when DNP was cleared, and "" when DNP was set
2023-02-01 22:40:58 +00:00
Seth Hillbrand 6fa2eedb4b Avoid the obsolete GetNextPin() call
This iterated over all pins to find the pin after a given item.  Because
out pattern is consistently to iterate in the outer loop, this means
that we were an O(n^2) loop for the pins just to find their names.  This
affected very large parts (e.g. FPGAs) when switching sheets to display
2023-01-20 14:12:15 -08:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +00:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Seth Hillbrand 8a26bf6c41 Tweak DNP display settings
Use ERC error color
Make lines 3 * default line width (instead of 4 *)
2023-01-11 11:29:46 -08:00
Seth Hillbrand f99e374559 Make DNP more visible
Adds red cross to the DNP display.  Allows showing the DNP even when
plotting black/white

Fixes https://gitlab.com/kicad/code/kicad/issues/13456
2023-01-09 15:31:50 -08:00