Commit Graph

119 Commits

Author SHA1 Message Date
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
Seth Hillbrand 03e12535a8 Include symbol flags in swap
Needed for undo/redo.  All properties should be listed in the swap

Fixes https://gitlab.com/kicad/code/kicad/issues/13409
2023-01-06 14:40:39 -08:00
Wayne Stambaugh d99e09014b Rename SYMBOL_INSTANCE_REFERENCE to SCH_SYMBOL_INSTANCE. 2023-01-04 15:39:50 -05:00
Wayne Stambaugh 78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jeff Young 24786fe0e9 Fix multi-unit symbol bugs.
1) SPICE pins need to include all units
2) Already-seen-unit-x needs to be reset when getting netlist again.

Fixes https://gitlab.com/kicad/code/kicad/issues/13164
2022-12-16 13:57:46 +00:00
Jeff Young 8931e55dd2 Templatize MigrateSimModel() so it can be used on LIB_SYMBOLs as well.
Fixes https://gitlab.com/kicad/code/kicad/issues/13080
2022-12-08 23:57:43 +00:00
Jeff Young b9287968d6 Update symbol default prefixes after updating instance data.
Also moves the sim model fixups after the instance data updating as
it uses the prefixes.
2022-12-07 01:34:56 +00:00
Wayne Stambaugh 0a62c17040 Remove schematic symbol value and footprint field instance data.
https://gitlab.com/kicad/code/kicad/-/issues/12933
2022-11-30 11:47:13 -05:00
Wayne Stambaugh 6f90a63381 Fix legacy schematic symbol instance data bug. 2022-11-20 14:57:37 -05:00
Jeff Young a61ac363c2 Excise the remaining occurrences of "Alias" for derived symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/12895
2022-11-16 18:37:40 +00:00
Jeff Young bb446c8d01 Set fields into instance data.
Fixes https://gitlab.com/kicad/code/kicad/issues/12915
2022-11-16 13:33:55 +00:00
Jeff Young 2dac73e421 Remove dangerous SCH_FIELD::IsVoid() call.
This call didn't differentiate between GetText() and GetShownText() and
was used in instances where the difference matters.
2022-11-03 17:19:59 +00:00
Jeff Young c9ce8da10a Dim DNP textbox borders.
Fixes https://gitlab.com/kicad/code/kicad/issues/12709
2022-10-21 22:28:49 +01:00
Wayne Stambaugh a11c40197f Expunge default symbol instance from schematic file format.
Now that importing hierarchical sheets "properly" imports instance data,
the default symbol instance setting doesn't have any meaning.
2022-10-04 15:42:41 -04:00
Seth Hillbrand e055302a3c Allow printing backgrounds prior to foreground
Eeschema shows background fills on a different z-level than the rest of
the symbols/elements.  Print the backgrounds prior to the foregrounds in
order to preserve this view for print output

Fixes https://gitlab.com/kicad/code/kicad/issues/12559
2022-10-02 13:23:54 -07:00
Wayne Stambaugh 2b387ae9c3 Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Added project name to instance data to improve the readability of the
schematic file format.  It also creates an opportunity to remove orphaned
instance data by project name rather than cryptic UUIDs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-10-02 15:06:42 -04:00
Wayne Stambaugh 979b4a4eb7 Revert "Move schematic symbol instance data back into symbol definition."
This reverts commit 7984e114db.
2022-09-29 15:33:23 -04:00
Wayne Stambaugh 7984e114db Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-09-29 17:47:57 +00:00
Marek Roszko 2646be730d Don't place bookmarks for power symbols (like GND) 2022-09-25 08:50:48 -04:00
Marek Roszko a381a0acb2 Generalize bookmarks to support additional groups and names 2022-09-24 22:35:20 -04:00
Marek Roszko 6f8205235f ADDED: Add outline support to schematic PDF and PCB plot 2022-09-24 21:45:48 -04:00
jean-pierre charras 78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Marek Roszko 5f85c3b8b9 Fix everything loading DNP 2022-09-17 00:21:05 -04:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Seth Hillbrand 524b129c64 ADDED: Support for explicit DNP field
Dims elements shown as DNP.  Adds property `dnp` to explicitly denote
parts that should not be populated. These parts are not included in X/Y
files
2022-09-16 22:26:16 +00:00
kliment b97f9ea329 Add support for symbol unit display names in eeschema and symbol editor 2022-09-14 22:11:37 +00:00
Jeff Young ef05069ebc ADDED 2 new vars: EXCLUDE_FROM_BOM and EXCLUDE_FROM_BOARD. 2022-09-13 13:47:24 +01:00
Jeff Young 9bed145475 Allow the current sheet a chance to resolve text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/8692
2022-09-08 14:10:18 +01:00
Jeff Young 59dc6c8e45 Add wire and bus popups for PDF export.
Fixes https://gitlab.com/kicad/code/kicad/issues/12157
2022-09-06 13:59:52 +01:00
Jeff Young 8afc1db7a6 Property popups for symbols, labels, sheets, and footprints in PDF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5521
2022-09-06 13:59:52 +01:00
jean-pierre charras 0e95f06c7b SCH_SYMBOL::UpdatePins() re-add pin filtering by conversion:
It was removed by accident in commit c72091d7e.
without the filtering pins, in symbols with conversion, pins are added
twice in Pin list and create errors in ERC
2022-09-05 09:01:24 +02:00
Jeff Young ca5d95a62b Don't filter pins for conversion or unit.
Symbol datastructure is used for all instances, and some instances may
have different conversion and/or units than others.
2022-09-03 21:47:52 +01:00
Jeff Young b1e5cb5a56 ADDED ${SYMBOL_DESCRIPTION} and ${SYMBOL_KEYWORDS}.
Fixes https://gitlab.com/kicad/code/kicad/issues/9783
2022-09-03 19:29:59 +01:00
jean-pierre charras c72091d7e0 fix a compil warning. 2022-09-03 19:55:54 +02:00
Wayne Stambaugh 4c096fee15 Eeschema: fix crash when attempting to edit missing library symbol.
Disable the edit symbol buttons in the symbol properties dialog when
there is no library symbol to edit.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11318

(cherry picked from commit 5afeb45a84)
2022-09-02 16:25:34 -04:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jon Evans 5c43c46365 Add new symbol fields to autocomplete list 2022-08-26 23:53:23 -04:00
Jon Evans 460e8015f0 Allow referencing LIB_ID components in symbol fields 2022-08-26 20:30:48 -04:00
Wayne Stambaugh 7c6d9f67f9 Eeschema: fix broken instance data when adding new symbol.
Pass the current SCHEMATIC object pointer in SCH_SYMBOL ctor so that
newly created symbols will update the current instance data on creation
when the current sheet instance is being displayed.

This is a better fix for the master branch and cherry-picking from 6.0
was a mess.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
2022-08-26 13:35:49 -04:00
Jon Evans ae6a2a6443 ADDED: Database libraries MVP
Allows placing parts from an external database that reference symbols from another loaded library.

Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436
2022-08-26 10:51:13 -04:00
Marek Roszko e0f28fc4e1 Replace wxFindReplaceData with our own container
By dropping the flags, we can be strict with options.
Also it makes future usage of search functionality a little more "UI" framework independent
2022-08-23 22:16:51 -04:00
Mikolaj Wielgus 6fad25f8ed Allow mapping sim model pins to arbitrary string symbol pin numbers
This change removes the incorrect assumption that symbol pin numbers are
integers and are the same as indexes in the vector storing the symbol
pins.

"~" is now used to denote a floating sim model pin.
2022-08-22 08:13:26 +02:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00