Commit Graph

10142 Commits

Author SHA1 Message Date
Seth Hillbrand 1e03c84918 Add ability to toggle attributes
Adds actions and context menu options to adjust attributes.
2023-05-04 11:51:21 -07:00
Seth Hillbrand a28d590b9b Force not-on-board symbols to NONE priority
Symbols that are not on the board should not affect the arbitrary names
assigned to unlabeled nets.
2023-05-04 11:51:21 -07:00
Jeff Young c20ef06f56 Use correct sheetpath when exporting netlist. 2023-05-04 14:27:04 +01:00
Jeff Young 384f65c45e Be careful of infobar outliving symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/14680
2023-05-04 11:51:47 +01:00
jean-pierre charras 8a52941624 bom_csv_grouped_by_value_with_fp.py: fix compatibility with python < 3.9 2023-05-04 08:48:39 +02:00
Jeff Young c4668c1d3a Don't store resolved values in symbol fields table editor dataStore.
We're going to use the dataStore to update the symbol, so
if we store resolved values it will nuke any text variables
even if the field wasn't edited.

Not sure if the BOM generator has a separate resolve-variables
step or not.  But it will need one as the code removed here
only worked for Values and Footprint fields anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/14423
2023-05-04 00:06:44 +01:00
Seth Hillbrand 8b73b0549f Remove matching parents/neighbors in subgraphs
This ensures that when bus elements or labels matching bus elements are
removed that the stale neighbor/parent references are similarly removed

Matching 7.0 commit 4cdf75dc72
2023-05-03 13:37:11 -07:00
jean-pierre charras 2aa9ea87eb Simulator: when using Incremental Connectivity, ensure the netlist is up to date 2023-05-03 18:59:18 +02:00
Jeff Young 4c2fcb6614 Line width in Plot dialog is minimum, not default.
Fixes https://gitlab.com/kicad/code/kicad/issues/14367
2023-05-03 17:34:36 +01:00
Jeff Young b53f337938 More accurate terminology for cross-probe settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/13088
2023-05-03 10:50:31 +01:00
Seth Hillbrand cb85412b85 Cleanup Undo ordering
The undo command has accreted a number of things over the years.  This
prunes back the changes to the minimum required number and correctly
orders the actions

Fixes https://gitlab.com/kicad/code/kicad/issues/14661
2023-05-01 19:29:48 -07:00
Jeff Young df7d62fdd3 Added a sort-order dropdown to lib-tree filters.
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match.  The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description.  All that is left to the
provider of the weighted search terms array.
2023-05-01 21:26:43 +01:00
Mike Williams 04a53ea40d Picker Tools: make sure we know what tool we are
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14621
2023-05-01 12:43:09 -04:00
Mike Williams 39cc686dc4 Back Annotation: add support for DNP and Exclude from BOM attributes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14584
2023-05-01 08:54:14 -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
Mike Williams c1bebf6490 Symbol Fields Table: fix crash
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14532
2023-04-30 10:53:46 -04:00
Jon Evans dc847db19d Add initial support for database library settings UI
For now, just for diagnostic purposes (settings changes are not preserved)
2023-04-29 18:15:00 -04:00
Seth Hillbrand f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Jeff Young d5cb100f72 Fix sheetPath handling in SPICE model generation. 2023-04-28 16:19:14 +01:00
Jeff Young be657d947c Import pin-names from LTSPice models. 2023-04-28 12:52:37 +01:00
Jeff Young e1b39946fe ADDED: show/hide controls for directive labels. 2023-04-28 00:32:49 +01:00
Jeff Young 4b0027a5d7 Implement better sheet-path awareness for label text var resolution. 2023-04-28 00:32:49 +01:00
Jeff Young 37c441a189 Minor performance improvement. 2023-04-28 00:32:49 +01:00
Jeff Young 1a7e99ed07 Formatting. 2023-04-28 00:32:49 +01:00
jean-pierre charras ae7456e055 SYMBOL_LIB_TABLE and PANEL_SYM_LIB_TABLE: fix some issues:
- Ensure a change in plugin type is detected
- do not force automatic plugin type selection for *.lib files that need
an access to these libraries: they can be not always available.
2023-04-27 12:54:18 +02:00
Jeff Young 5e21e94478 Set currentSheet when exporting netlist.
Patch courtesy of Fernando Gomez.
2023-04-26 18:19:15 +01:00
Jeff Young 9d2824ec5e Pass correct sheetpath to SCH_SYMBOL(). 2023-04-26 17:25:27 +01:00
jean-pierre charras a06c4cac73 SCH_IO_MGR::GuessPluginTypeFromLibPath() Ensure env vars are expanded in filename.
For legacy libs ans cadstar libs the extension is .lib.
So we need to read the header of the file, and therefore expand the env var inside
the filename, if used.
2023-04-26 18:14:55 +02:00
Jeff Young d816fb071f Use fileds from flattened lib symbol when updating.
Fixes https://gitlab.com/kicad/code/kicad/issues/14577
2023-04-26 12:47:55 +01:00
Jeff Young dd6e3c0432 Finish two-step rename of ltspice folder.
(CLion didn't want to do a capitalization-only change in a
single step.)
2023-04-25 15:27:46 +01:00
Jeff Young 744dec65d7 Add (limited) support for LTSpice DATAFLAGs.
Even though we can't evaluate the expressions, we should at
least show the text so users can decide what to do with them.
2023-04-25 15:27:46 +01:00
jean-pierre charras fd6fb4a87b netlist exporter: export only the field value, even if field name is shown.
Previously, when the field name was visible, the exported field value was
prefixed by the field name, and this is incorrect.
Fixes #14611
https://gitlab.com/kicad/code/kicad/issues/14611
2023-04-25 12:43:15 +02:00
jean-pierre charras b9ed84b7db Fix minor compil warnings 2023-04-25 12:43:15 +02:00
Jeff Young 20ab268abf Improve sheet-handling of ERC item description generation.
(In particular, stop crashing.)
2023-04-24 15:09:08 +01:00
Jeff Young 69500bfcaa LTSpice schematic import based on the work of Chetan Shinde. 2023-04-24 13:52:52 +01:00
Jeff Young 60b019591d Simulator fixes.
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:52:52 +01:00
Jeff Young c2cc27c25c Formatting. 2023-04-24 13:52:52 +01:00
Jeff Young c381b6d024 More robust file reading for simulator files. 2023-04-24 13:52:52 +01:00
jean-pierre charras afc6b325b2 Eeschema: minor enhancement: add SCH_JUNCTION::GetMsgPanelInfo() and show info. 2023-04-24 12:25:10 +02:00
jean-pierre charras c617abe8e9 SCH_BITMAP and PCB_BITMAP: rename m_image to m_bitmapBase. Add more info
in GetMsgPanelInfo() (PPI, scale).
m_image name was confusing: it is not a wxImage, but a BITMAP_BASE item,
and m_image name was already in use in BITMAP_BASE, used inside SCH_IMAGE.
Bitmap properties dialog: show PPI value and add Title to dialog.
2023-04-22 17:28:06 +02:00
Seth Hillbrand 6e8a5acc66 Bug Fixes for new incremental connectivity
- Ensure that critical paths (ERC/netlister) are fully-rechecked
- Handle symbol/pin distinction in change markers
- Fully connect hierarchical pins in one pass descending
2023-04-21 13:35:18 -07:00
Seth Hillbrand 7eb728ca12 Don't consider saving SCH_MARKERs
These are ephemeral, view-only elements, so don't include them in our
save map

Fixes https://gitlab.com/kicad/code/kicad/issues/11405
2023-04-19 17:00:50 -07:00
Seth Hillbrand a154571438 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1794
2023-04-19 16:14:35 -07:00
jean-pierre charras 1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02:00
Mike Williams 09d7e24b6d Symbol Fields Editor: drop some settings dynamic_casts
Not needed, and confusing.
2023-04-19 09:52:31 -04:00
Jeff Young cc6fc4790d Copy RC_ITEM fix to ERC_ITEM (where it's actually needed).
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:09:33 +01:00
Marek Roszko ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
Seth Hillbrand 32d17547e5 Fixup settings loading
Settings loading needs to account for potential chaining, so each
instance should be created before being Load()ed.  Additionally, add the
settings loading to QA
2023-04-18 16:00:31 -07:00
Jeff Young 51b6ec0dce Don't exit KiCad when simulator window is closed. 2023-04-18 23:55:56 +01:00
Jeff Young f7a552a2b3 Ensure item is gridded if there was no motion between clicks. 2023-04-18 23:55:56 +01:00
Seth Hillbrand 2cd861dbd5 Remove extraneous symbol editor settings 2023-04-18 13:46:33 -07:00
Seth Hillbrand 892e4536b0 Remove extraneous includes 2023-04-18 13:45:32 -07:00
Seth Hillbrand e6ab9a88ce Remove locks from settings
Settings should be initialized on start-up.  This removes the option of
lazily loading the settings from file and instead requires all settings
needed to be loaded on KiFACE start before requesting data from the
settings object
2023-04-18 13:40:25 -07:00
Jeff Young 2c34a08bf1 Ignore empty field-name-templates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14552
2023-04-18 17:31:25 +01:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Jeff Young 02c5a31b99 Fix close button on simulator frame.
Fixes https://gitlab.com/kicad/code/kicad/issues/14551
2023-04-16 23:45:18 +01:00
Jeff Young a540c01c61 Double double-add items to the view. 2023-04-16 23:04:47 +01:00
Jeff Young 6fb8916798 The symbol viewer handles its own message panel. 2023-04-16 18:47:04 +01:00
Jeff Young 6f59740953 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)
2023-04-16 14:21:23 +01:00
Jeff Young b74d964bff Handle legacy libraries with escaped symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14057
2023-04-15 17:47:32 +01: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 d01c023d5a Retire the lib-tree scoring algorithm.
It appears to cause more confusion than help.

Fixes https://gitlab.com/kicad/code/kicad/issues/13905
2023-04-14 23:35:27 +01:00
Jeff Young d64cb7f81b More uniform handling of power symbols and exclude-from-simulation. 2023-04-14 19:42:13 +01:00
Jeff Young 9f56b75f01 Clean up atrophied code. 2023-04-14 19:42:13 +01:00
Jeff Young 05185ec81a Save library when it's selected in lib tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/14220
2023-04-14 17:35:37 +01:00
jean-pierre charras 77fb7b1182 ERC: set default setting ERCE_SIMULATION_MODEL to ignore
Most of projects do not manage spice settings.
2023-04-14 17:21:09 +02:00
Jeff Young 4eb0ccffe5 Bring Sim Command dialog layout in line with Kicad std dialog layout. 2023-04-14 13:00:31 +01:00
Okan Demir 75267a7366 Fixes issues pointed in the reviews
Wraps string literals with 'wxS', form is generated by wxFormBuilder
2023-04-14 11:01:01 +00:00
Okan Demir 82e8198fee Adds missing transient simulation settings
Adds maximum step size setting used by transient analysis solver,
and 'use initial conditions (uic)' setting. Enabling uic disables
DC operating point analysis and may introduce singularities. It requires
a careful selection of initial conditions of circuit elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/2515
2023-04-14 11:01:01 +00:00
Jeff Young 8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00
aris-kimi 18cebe3779 Don't assume an EDA_ITEM is a SCH_ITEM. v2
In the same way as cec4109176 did

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14528
2023-04-13 11:12:02 +01:00
Jeff Young a24a63e416 Search in label fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/14075
2023-04-12 23:21:53 +01:00
Jeff Young 1f140953d6 Manual cherry-pick of 912bd4458f 2023-04-12 23:21:53 +01:00
Jeff Young b876af55df Don't exit symbol compare early when reporting. 2023-04-12 23:21:53 +01:00
Ian McInerney 6c05801d9e Make the property grid compatible with wx 3.3 2023-04-12 18:57:12 +01:00
Ian McInerney 18e573d5e9 Remove stray wx include
There is no reason to include the actual string implementation header
here.
2023-04-12 18:57:12 +01:00
Jeff Young 66f48d56ae Separate sheet reloads (MODEL_RELOAD) and schematic reloads (SUPERMODEL_RELOAD).
Fixes https://gitlab.com/kicad/code/kicad/issues/14523
2023-04-12 11:51:09 +01:00
jean-pierre charras de579af352 SCH_LABEL_BASE::SetPosition(): ensure field positions are also handled.
Fixes #14520
https://gitlab.com/kicad/code/kicad/issues/14520
2023-04-12 11:15:17 +02:00
jean-pierre charras f56e569a25 Ensure we do not use a non existing pin in SIM_MODEL::MigrateSimModel()
Fixes #14522
https://gitlab.com/kicad/code/kicad/issues/14522
2023-04-12 09:37:59 +02:00
Jeff Young eef3492fc0 Make symbol/footprint trees sensitive to language change. 2023-04-11 23:51:58 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
Jeff Young cec4109176 Don't assume an EDA_ITEM is a SCH_ITEM.
(It might in fact be a LIB_ITEM, which we don't put in
the RTree anyway.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14516
2023-04-11 15:26:39 +01:00
jean-pierre charras f01e083f7c fix 2 issues related to SCH_GLOBALLABEL items:
- Ensure the first field in m_fields has id = 0 to be seen has hypertext
(it was not the case after reading a .kicad_sch file)
- when converting this item to another label/text, remove this special Field
from the copied field list to the converted label.
2023-04-10 09:58:27 +02:00
Jeff Young ea59d583d5 ADDED exclude-from-simulation property to text items and textboxes. 2023-04-09 19:03:36 +01:00
Jeff Young a226f7fc14 Don't delete default intersheetrefs field from global labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/14493
2023-04-09 19:03:36 +01:00
Marek Roszko 2025923ef4 Prevent crash during schematic window close 2023-04-08 20:31:52 -04:00
Wayne Stambaugh d962b062ca Fix crash when duplicating symbol unit with alternate body style.
* Add check for valid symbol library link in annotation code to prevent
  crash even if the symbol was not defined correctly.  This will assert
  in debug builds.
* Fix broken pin comparisons when library symbols have units with alternate
  body style defined.
* Remove some macros from LIB_SYMBOL comparison function which made
  debugging painful.
* Exit LIB_SYMBOL comparison function as soon as non-equivalent comparison
  occurs.
* Fix broken library symbol comparison due to name differences when
  checking for existing variants of the library symbol.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14491
2023-04-08 15:29:01 -04:00
jean-pierre charras c6bcfda84c DIALOG_IMAGE_PROPERTIES: fix some issues:
- add missing dialog_image_properties_base.fpb file
- fix not displayed image.
2023-04-08 16:41:55 +02:00
Seth Hillbrand 2cd854af14 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes
2023-04-07 10:08:43 -07:00
Seth Hillbrand 012737593b Handle nested netclass assignments
Netclass directives should not be overriden, instead hold our error
checking for actually missing nets

Fixes https://gitlab.com/kicad/code/kicad/issues/14494
2023-04-06 17:38:13 -07:00
Ian McInerney 18ea3be3f2 Revert "Reintroduce constexpr to COLOR4D"
This reverts commit 33da9b2327 and the
following commit dc08c48f33.

C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).

An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.

For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Ian McInerney dc08c48f33 Try to fix linking after constexpr change
Somehow, GCC 10 and 11 were unable to locate the prebuild colors when
they were constexpr in gal, so give them on the link line again.
2023-04-06 15:20:16 +01:00
Ian McInerney ea62b145ff Introduce core interface library
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
2023-04-06 15:01:18 +01:00
jean-pierre charras 7eb13c3d33 Symbol editor: clear the edit flags of a pasted pin after place it.
When pasting a single pin, its edit flags were not cleared, and create
issues when trying to edit the pasted pin.
Fixes #14188
https://gitlab.com/kicad/code/kicad/issues/14188
2023-04-06 11:08:01 +02:00
Seth Hillbrand 16b4ec3c7e Allow bus elements to connect
Previously, bus elements that were not instantiated as individual nets
could not connect to each other.  This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names.  Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
  this patch or by individually instantiating each bus element as a
local label

Fixes https://gitlab.com/kicad/code/kicad/issues/14300
2023-04-04 15:23:29 -07:00
Jeff Young 8dfe8e595c Merge MR 1433 from Stefan <stifisax@gmx.ch>. 2023-04-04 17:39:18 +01:00
Stefan c2686d881e add include 2023-04-04 17:31:46 +01:00
Stefan 992f38a6ce fix used functions 2023-04-04 17:31:46 +01:00
Stefan 34700c00f6 fix error string 2023-04-04 17:31:44 +01:00
Stefan fb593bd0c0 check Eagle schematic to be in xml format before parsing 2023-04-04 17:30:10 +01:00
Jeff Young a9b2234f4e Use a softer Reset for grid settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/14458
2023-04-04 17:05:21 +01:00
Mike Williams 247c2edbed Symbol Fields Table: various bug and coverity fixes 2023-04-04 11:27:09 -04:00
Mike Williams 791a9e6c78 Symbol Fields Table: fix up Rename field function 2023-04-04 11:27:09 -04:00
Stefan e6fd70777b do not allow import of legacy kicad schematic via importer 2023-04-04 13:21:05 +00:00
Jeff Young 7e5cd01079 Improve scoping control of connetion members.
(The real bug here is that CONNECTION_GRAPH::assignNetCodesToBus() was
growing the bus aliases members list because it used a non-const
reference to it as a local storage list.  The const scoping of it will
prevent this type of error in future.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14269
2023-04-04 12:03:06 +01:00
Jeff Young bd60f38569 Possible protection from acessing deleted window data.
(Long shot for Sentry KICAD-MM.)
2023-04-03 23:44:40 +01:00
Mike Williams 68353e99d1 Symbol Fields Table: more MSVC fixes 2023-04-03 13:12:13 -04:00
Mike Williams 310d26620e Symbol Fields Table: more MSVC build fixes 2023-04-03 12:27:48 -04:00
Jeff Young 9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Mike Williams b7b7dc6558 Symbol Fields Table: general settings saving cleanup 2023-04-03 09:07:52 -04:00
Mike Williams 9c3d93eb34 BOM Generator: wire up forced exclusion, optional DNP exclusion 2023-04-03 09:07:52 -04:00
Mike Williams 79a829395d BOM Generator: minor bug fixes and string changes 2023-04-03 09:07:52 -04:00
Mike Williams c5cc313da9 Symbol Fields Table: BOM presets saved in JSON settings 2023-04-03 09:07:52 -04:00
Mike Williams 753ae21fd4 BOM Generator: wire up to kicad-cli 2023-04-03 09:07:52 -04:00
Mike Williams 8433f94886 Symbol Fields: move more strings to template field names usage 2023-04-03 09:07:52 -04:00
Mike Williams 6a726709b5 Symbol Fields Table: wire up BOM format presets 2023-04-03 09:07:51 -04:00
Mike Williams bb7d55e5a4 Symbol Fields Table: fix Qty column
Really need to refactor these strings out of everything...
2023-04-03 09:07:51 -04:00
Mike Williams 106747a03b Symbol Fields Table: file chooser + working export 2023-04-03 09:07:51 -04:00
Mike Williams b59fd76c15 Symbol Fields Table: export formatting options started
Also move export into the data model and out of the dialog so we can
eventually do this without a GUI.
2023-04-03 09:07:51 -04:00
Mike Williams 97eed8c8a2 Fields Data Model: pull more UI controls interaction out of class 2023-04-03 09:07:51 -04:00
Mike Williams cccd708860 Symbol Fields Table: move data model into its own file 2023-04-03 09:07:51 -04:00
Mike Williams 21c81b19fa Symbol Fields Table: upgrade dialog in prep for exporter 2023-04-03 09:07:51 -04:00
Mike Williams a39ce5bf9e Dialog Symbol Fields Table: allow re-labeling columns 2023-04-03 09:07:51 -04:00
Mike Williams d117d4e8f5 Symbol Fields Table: Add Presets
No backing store in JSON settings yet.
2023-04-03 09:07:51 -04:00
Mike Williams f98e36efa9 Symbol Fields Table: allow hiding references
If that's what the user wants, let them.
2023-04-03 09:07:51 -04:00
Mike Williams 9b942ee8f3 Symbol Fields Table: fix up some display/field/canonical name confusion 2023-04-03 09:07:51 -04:00
Mike Williams d8df792c6a Fields Symbol Table: really move columns when the user moves them
Move the internal columns and rebuild the table when a user moves the
columns. This is the only way to fix selection issues across reordered
columns.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12295
2023-04-03 09:07:51 -04:00
Mike Williams 79b20812d0 Symbol Fields Table: move towards field names instead of fixed indices
Qty column can now be hidden.

We eventually need to get to the point that we are able to rearrange the
columns in the internal data model to work around wxGrid selection
issues.
2023-04-03 09:07:51 -04:00
Mike Williams 1982c1af80 Symbol Fields Table: save current table properties
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5006
2023-04-03 09:07:51 -04:00
Mike Williams e53ee9df4b Symbol Fields Table: add rename column functionality 2023-04-03 09:07:51 -04:00
Jeff Young 7252c7471c Use enums for column ids.
(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
2023-04-02 15:10:06 +01:00
Jeff Young 3a8d6dffba Don't close ERC window when changing sheets.
This Reset() override was originally added to fix a bug when opening
a new schematic in stand-alone.  However, we now do that sort of
cleanup in SCH_EDIT_FRAME::doCloseWindow().

Fixes https://gitlab.com/kicad/code/kicad/issues/14470
2023-04-02 11:48:23 +01:00
jean-pierre charras aaae50f2aa ERC do not test power symbols for simulation model.
Fix also a minor cosmetic issue with ERCE_SIMULATION_MODEL messages.
Fixes #14463
https://gitlab.com/kicad/code/kicad/issues/14463
2023-04-01 10:16:44 +02:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
jean-pierre charras 1aa0ef05c0 Fix missing include. 2023-03-30 08:49:36 +02:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Jon Evans c35cefe1d5 DbLib: Get rid of some GCC warnings 2023-03-26 19:43:33 -04:00
Roberto Fernandez Bautista fc04f5135f CADSTAR Sch: TERMATTR may have more than one attribute subnode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13526
2023-03-26 15:54:21 +01:00
Jeff Young 1788db53e5 Don't complain about no sim model when running Sim Model Editor dialog.
Also removes some atrophied code, and makes sure changes to the parameter
grid for raw spice models gets saved.
2023-03-25 20:22:04 +00:00
Jeff Young 60aadfee40 Move separation of model name from params earlier in the process.
We need just the model name when we look for a match in the library file.
2023-03-25 12:45:36 +00:00
jean-pierre charras 1b4f905f4c Plot symbol graphic texts: fix incorrect position of texts in some rotations.
The plot code is now similar to the one for symbol fields
Fixes #14327
https://gitlab.com/kicad/code/kicad/issues/14327
2023-03-25 12:45:09 +01:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
Seth Hillbrand 0984599624 Pins are case-sensitive
Cleanup should remove mis-matched cases

Fixes https://gitlab.com/kicad/code/kicad/issues/14415
2023-03-24 11:21:35 -07:00
Wayne Stambaugh 244c37298f Fix Doxygen commenting issues. 2023-03-24 11:57:52 -04:00
jean-pierre charras b622e3a3f7 SYMBOL_EDIT_FRAME: fix issue after loading a symbol from schematic editor.
Selected items become invisible.
Fixes #14151
https://gitlab.com/kicad/code/kicad/issues/14151
2023-03-23 18:36:59 +01:00
Wayne Stambaugh a0d02fbab1 Make multivector.h header order independent.
Attempt to clean up all redundant headers that multivector.h touches.
2023-03-23 13:26:32 -04:00
Jon Evans dd8b52af93 Be more flexible about extracting booleans from database
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14376
2023-03-22 21:24:24 -04:00
Jeff Young b8cf7cc080 Split name from additional params only when model is a library reference. 2023-03-22 13:52:17 +00:00
Jeff Young 5bda3b99f9 Handle single-token flag parameters.
Also fixes a bug where all VDMOS instance parameters weren't marked as
instance parameters.

Also fixes a bug where VDMOS thermal models weren't supported (they
have two extra pins: Tj and Tcase).
2023-03-22 13:52:17 +00:00
Jeff Young 9dc16eb014 Don't include non-overridden parameters in Sim.Params.
Fixes https://gitlab.com/kicad/code/kicad/issues/14369
2023-03-22 13:52:17 +00:00
Salvador E. Tropea 7e3f1b1a00 Adds the missing plot formats to `kicad-cli sch export` 2023-03-22 02:14:50 +00:00
Jeff Young 39a801423e Separate legacy model name from parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13988
2023-03-21 13:29:17 +00:00
Ian McInerney 8038b3a3e1 Reorganize eeschema cmake after ngspice changes 2023-03-20 16:54:32 +00:00
Ian McInerney 016c958021 Always build spice simulator support
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
2023-03-20 16:54:32 +00:00
Jeff Young 5798b586f0 Ignore extraneous LTSpice parameters for VDMOS models.
Also adds special case handling of VDMOS syntax to allow parens (or extra
spaces, linebreaks, etc.) between "VDMOS" and "NCHAN"/"PCHAN".

Fixes https://gitlab.com/kicad/code/kicad/issues/14299
2023-03-20 16:16:44 +00:00
Jeff Young a14c017def Save location of legend in worksheet.
Also provides a different cursor when over a legend (to make it clearer
that you can drag it).
2023-03-20 09:51:41 +00:00
Jeff Young ec6d709929 Make sure legend reflects gain/phase for AC small signal analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14301
2023-03-19 23:02:58 +00:00
Jeff Young ef0d561a5c Less nagging. (If we need a field name, then create one.)
Also cleans up empty fields when exiting the dialog.
2023-03-19 20:43:18 +00:00
Alex 10c4b948cb Support canceling initial global library table setup. 2023-03-19 14:30:53 +03:00
Jeff Young afe813cae5 Remove accelerator keys from schematic find/replace dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14304
2023-03-18 23:33:23 +00:00
jean-pierre charras d62d775115 Remove non existing OnSize event in SYMBOL_EDIT_FRAME EVENT_TABLE 2023-03-18 07:30:05 +01:00
Jeff Young 607622e8f8 Make the two Create() methods more parallel. 2023-03-17 15:58:28 +00:00
jean-pierre charras 5bd491bd74 Avoid schematic editor frame to go on top when selecting a symbol.
It was s side effect of a CrossProbe called on a symbol selection.
This also replace commit e51594cdf5.
Fixes #14316
https://gitlab.com/kicad/code/kicad/issues/14316
2023-03-17 16:37:49 +01:00
Jeff Young 222cd4d009 Handle underscore in parameter names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14308
2023-03-16 23:40:52 +00:00
Roberto Fernandez Bautista 3d661585dd Fix build errors and warnings from CADSTAR 2023-03-16 21:17:40 +01:00
Roberto Fernandez Bautista 9d5672464e CADSTAR Sch: Apply default text code to fields when none is specified 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 7534c56723 CADSTAR: Improve loading performance (cache symdef name/alternates) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista b70fe88145 CADSTAR Parts: Fix parsing of hidden pins (possible for several pins per net!) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 6ab2112135 ADDED: CADSTAR Parts Libraries (.lib) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 8f83f27336 CADSTAR SCH: Refactor loading of symbols out of loading part info 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista c34207b726 CADSTAR: Remove wxPoint + improve formatting 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista 738b36cf7d CADSTAR csa / cpa ignore Hierarchy
This node doesn't have any equivalent in KiCad so for now we ignore it. In future, we could parse it in detail, to obtain the tree-structure of symbols/footprints in a cadstar library
2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista e8ead30baf WIP: CADSTAR Parts now shows up in library tables and is handled correctly (todo: read cadstar header) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista 2da13a9e07 CADSTAR SCH: Separate out saving loaded lib symbols to library 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista 7a6b64d371 Special case cadstar libraries when error reporting. 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista e2a4d58e8f Extract CADSTAR PIN_TYPE and PIN::POSITION into a separate header 2023-03-16 21:07:04 +01:00
Wayne Stambaugh e51594cdf5 Fix broken window Z order when editing a symbol from the schematic. 2023-03-16 15:18:41 -04:00
Jeff Young 6d296038f3 Improve simulation error reporting.
1) More REPORTER, less exception processing
2) Remove UI calls from SPICE_MODEL
3) Don't replace netlist with errors; show both
4) Don't bail out of netlist generation after single error

Fixes https://gitlab.com/kicad/code/kicad/issues/14295
2023-03-16 16:12:29 +00: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
jean-pierre charras 893a362d9e Minor Coverity and compil warnings fix. 2023-03-15 20:09:04 +01:00
jean-pierre charras 5ce22d9673 Symbol editor: fix incorrect position of fields when loading a symbol from schematic.
In symbol editor, symbols are always shown not mirrored, not rotated.
So if the loaded symbol from schematic was rotated/mirrored, the position
of fields must be recalculated for the rotation 0, no mirror.
2023-03-15 17:55:18 +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
Jeff Young 37b0a5a504 Add quick DRC action for Diff Footprints.
Also makes the strings match the GUI better so people will know where
to find them later.

And fixes a couple of ERC items that referred to Board Setup (oops).
2023-03-14 11:52:23 +00:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young dc78797274 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233
2023-03-12 22:24:06 +00:00
Jeff Young c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
Jeff Young 74f064d3aa Don't keep smart pointers to wxWindows, particularly modeless ones.
wxWindows have their own lifecycle management.
2023-03-11 19:36:01 +00:00
Jeff Young c9351dfd67 Drawing improvements for symbol & footprint diffs.
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00
Jeff Young 5041bddc3b Union workbook sim commands with any defined on schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215
2023-03-10 21:33:06 +00:00
Jeff Young 6d29088668 Add missing command to SPICE directives list.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215
2023-03-10 21:33:06 +00:00
Jeff Young 3bc5e3dd8a Added PSPICE/LTSPICE JFET model parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425
2023-03-10 21:33:06 +00:00
Jeff Young 9546a40662 Correct usage of elipses after menu items.
(They should only be used when we collect more info before performing
the command.  If the command is something like showing the simulator,
then there should be no elipsis as we don't collect more info before
showing the window.)

Also improves a few of the menu tooltips.
2023-03-10 21:33:06 +00:00
Mike Williams b32ba16da4 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young 357427d803 Graphical diff for board vs library footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-10 17:16:40 +00:00
Ian McInerney 56b7d570f9 Remove uses of climits header/defines
2 of the 3 includes never used it, and the other could be switched to
  the C++ numeric_limits class.
2023-03-10 17:08:56 +00:00
Ian McInerney a6ebd60c3b CMake: Modernize Boost import to use imported targets 2023-03-10 16:38:35 +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
Jeff Young bc0d59801a Graphical diff for schematic vs library symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-09 18:04:52 +00:00
Jeff Young 2d6ab62da4 ADDED: schematic/library diff for symbols. 2023-03-09 18:04:52 +00:00
jean-pierre charras b96f3d085c Eeschema: save worksheet filename in project file.
The call to saveProjectSettings() was missing.
Fixes #14219
https://gitlab.com/kicad/code/kicad/issues/14219
2023-03-09 15:56:19 +01:00
Mike Williams e738750dff Schematic: sheet pins need to use their parent to resolve text variables
Otherwise the current sheet will be searched, which is one layer too far
down the hierarchy.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13998
2023-03-08 11:52:43 -05:00
Mike Williams 1bc4fc256a Sheets: check for duplicates using shown names
Otherwise sheet names using sheet variables may collide
2023-03-08 11:52:43 -05:00
Mike Williams bf59f1246b Schematic: correctly resolve label nets using sheet variables 2023-03-08 11:52:43 -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
jean-pierre charras 6343147bb3 Fix Coverity warnings. 2023-03-08 11:37:56 +01:00
Salvador E. Tropea 13de3c0656 Use constants for the names of the built-in colors
- Avoid repetition and errors from typos
- Allow simple changes
- Simpler data type handling, the constants are wxString

(Cherry-picked from f135881bd6 in 7.0)
2023-03-07 10:34:42 +00:00
James J 39e56485fc Consolidated ERC fixes
- Consistent calculation of IsStacked() for pins across ERC checks
 - Correct placement of ERC marker for unresolved field variables
 - Add sheet-specific paths to two ERC check results
2023-03-07 00:37:33 +00:00
Jeff Young 6838de962b Make SPICE netlist title explicit.
Fixes https://gitlab.com/kicad/code/kicad/issues/14183
2023-03-06 22:50:17 +00:00
Jeff Young 98d7b14dbc A better solution to keep SPICE netlist from being entirely selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/14177
2023-03-06 18:46:01 +00:00
Jeff Young b5060d2951 Support both wxWidgets APIs for excluded characters.
(Sadly they're mutually incompatible.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14153
2023-03-06 14:14:16 +00:00
Wayne Stambaugh a1fb8e1b1d Coverity fixes and code cleaning. 2023-03-06 07:12:18 -05:00
Jeff Young 7547e550aa Use name (even for fallback models) *if* it's specified in dropdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425
2023-03-06 11:17:39 +00:00
Jeff Young 630ff02369 Fix bone-headed logic.
(Else clause never gets called because 3 is always > 2.)
2023-03-06 10:26:59 +00:00
Stefan 90b5dba5ac Altium Importer: add note that Parameter Set import is not yet supported 2023-03-06 02:13:40 +00: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
aris-kimi 5b43dc4e7b Simulator: Fix diode ibv unit 2023-03-05 19:23:33 +02:00
Alex d2bd7e33b9 Remove extra canvas redraws when changing sheets. 2023-03-05 04:33:07 +03:00
Alex c1f4911d7e bom_csv_grouped_extra: use field-specific methods for data.
Fixes https://gitlab.com/kicad/code/kicad/issues/14129
2023-03-05 03:23:51 +03:00
Jon Evans 610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Wayne Stambaugh 4e99812145 Coverity fixes and code cleaning. 2023-03-04 13:02:05 -05:00
Jeff Young d714ff8549 Don't commit changes on paint events or updateUI events.
Also use std::numeric_limits::epsilon for comparing doubles.

Fixes https://gitlab.com/kicad/code/kicad/issues/13851
2023-03-04 00:10:01 +00:00
Jeff Young d1b7fa6b0f Slight improvement to property grid col widths in SME. 2023-03-04 00:10:01 +00:00
Jeff Young b6d0b65261 Naming conventions and commenting. No functional changes. 2023-03-04 00:10:01 +00:00
Seth Hillbrand 48740dd3f8 Clean exposure of CONNECTION_SUBGRAPH
Removes internals from public consumption.
2023-03-03 14:07:17 -08:00
Jeff Young d545216432 Prefer Clamp() to std::min( std::max() ). 2023-03-03 21:29:37 +00:00
Alex bfc3e2d29b Fix bitmap scaling when reading legacy schematic as well. 2023-03-04 00:11:09 +03:00
Seth Hillbrand 59fc62e898 Correct parent symbol for lib_text
The edited symbol should be pulled from the parent window when there is
not an existing text object
2023-03-03 12:39:07 -08:00
Jeff Young 14f1f3ec79 Convert inline models in Sim.Params fields to SPICE syntax.
Fixes https://gitlab.com/kicad/code/kicad/issues/14157
2023-03-03 18:18:03 +00:00
Jeff Young 2fb24347ad Use resolved fields when generating LIB_TREE info.
Fixes https://gitlab.com/kicad/code/kicad/issues/13737
2023-03-03 17:22:50 +00:00
Jeff Young be18413a90 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14073
2023-03-03 17:05:07 +00: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 5849458476 The screen for undo is the screen that *owns* the SCH_SHEET...
... not the screen the SCH_SHEET owns.

Fixes https://gitlab.com/kicad/code/kicad/issues/14099
2023-03-03 00:23:06 +00:00
Jeff Young f41f04b301 Hook up AddField handler to GRID_TRICKS for SCH dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/git/14153
2023-03-02 18:17:41 +00:00
Wayne Stambaugh 789bf6455a Coverity fixes and code cleaning. 2023-03-02 09:04:47 -05:00
Jeff Young dcba555d44 Make SME prop-grid hack Mac-only.
Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-03-02 10:42:13 +00:00
Jeff Young 63a545ebfd We don't need "(gain)" or "(phase)" in names any more.
Fixes https://gitlab.com/kicad/code/kicad/issues/14140
2023-03-02 00:38:39 +00:00
Jeff Young 190ee58ccf Don't deliver pedantic error messages to user. 2023-03-02 00:38:39 +00:00
aris-kimi db2780090c Simulator: Fix RLGC c unit 2023-03-01 23:03:54 +00:00
Jeff Young 9c68d4792f Fix bungle from earlier merge. 2023-03-01 13:43:46 +00:00
Jeff Young f5edcf82f2 Move only-write-model-if-it-contains-overrides up to base class.
It's necessary to keep us from writing out model lines for included
models and fall-backs of included models.
2023-03-01 13:31:57 +00:00
aris-kimi 4a761179d0 Simulator: Fix some cases with initial conditions 2023-02-28 21:31:04 +00:00
Seth Hillbrand 3207d1386e Avoid forcing all units
When the enduser is not allowed to change the status of "common to all
units", then it should be disabled

Fixes https://gitlab.com/kicad/code/kicad/issues/14084
2023-02-28 13:25:32 -08:00
Graham Keeth cc110399ea Fix column offset in BOM script
Debugged by @svk28

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14128
2023-02-28 19:10:56 +00:00
Jeff Young a1ceb585c7 Always highlight children when they're selected on their own.
Fixes https://gitlab.com/kicad/code/kicad/issues/13876
2023-02-28 13:39:07 +00:00
Jeff Young 281fde71b9 Make SIM_MODEL_SPICE_FALLBACK act more like the model it's a fallback for.
In particular, install/show the parameters, and keep the existing name
field.

Fixes https://gitlab.com/kicad/code/kicad/issues/14102
2023-02-28 12:26:04 +00:00
Roberto Fernandez Bautista b03366c9e8 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions
2023-02-27 23:57:39 +01:00
Jeff Young 766b1a1ca8 Continue rationalisation of vector, trace and signal names.
Also add a little bit more code so user-defined signals can be edited
without resetting their properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/14072
2023-02-27 21:11:31 +00:00
Mike Williams 45e67950fd Schematic: fix global labels overriding wrong power symbols
Need to check pin netname now that we support changing the value of the
power symbol.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14076
2023-02-27 09:25:05 -05:00
Fabien Corona 5b2784f418 sim - switches: open <-> closed in description 2023-02-27 09:54:14 +00:00
Jeff Young 79f13ea9c7 Don't eval empty string.
Fixes https://gitlab.com/kicad/code/kicad/issues/13756
2023-02-26 23:14:09 +00:00
Roberto Fernandez Bautista bcdb979128 CADSTAR SCH: Use screen grid instead of working grid when centering the design 2023-02-26 19:50:18 +01:00
Roberto Fernandez Bautista 698d0b7e92 CADSTAR Sch: Fix loading of graphical arc shapes
Correctly load arc shapes as real arcs instead of approximating now that
v7 supports graphical arcs in the schematic.

Also fix calculation of arc geometry for ccw arcs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14101
2023-02-26 19:46:34 +01:00
Jeff Young beb177fa79 Try and sort out the mess that is trace names and trace titles.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-26 18:08:42 +00:00
jean-pierre charras 51d46c0e73 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
2023-02-26 14:44:53 +01:00
Jeff Young 551773bf17 Save plot prefs (legend, grid, and dotted-secondary).
Fixes https://gitlab.com/kicad/code/kicad/issues/13940
2023-02-26 11:57:49 +00:00
Jeff Young c06cea2fe9 Fix units for ":power" operating points. 2023-02-25 23:30:01 +00:00
Jeff Young 23c1a23faf Provide power axis for DC-sweep analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14087
2023-02-25 23:11:29 +00:00
Jeff Young 8c8c5e1824 Provide a default xaxis for DC-sweep so we can add traces before sim is run. 2023-02-25 22:42:52 +00:00
Jeff Young 1fdc81e68d Make substrate and thermal junction nodes optional.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:30 +00:00
Jeff Young 2a79a453ec Get rid of m_sortedSymbolPinList in favour of a properly scoped variable.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:11 +00:00
Jeff Young 77ed53ab25 Nullptr safety. 2023-02-25 18:33:32 +00:00
jean-pierre charras 49a9fe38a0 Fix a compil warning 2023-02-25 19:06:46 +01:00
Jeff Young 4b427b2d0c Add second instance of "don't mess up user formatting" fix.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-25 16:31:16 +00:00
Jeff Young 2e5bf0210a Clear model name when switching to internal model.
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.

Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 15:22:20 +00:00
Jeff Young 9a0aeb4344 Adjust AC-small-signal plot names when saving placeholders.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-25 13:26:33 +00:00
Jeff Young ee956673b1 Respect readOnly cells in GRID_TRICKS.
Also fixes setting colors in the signals grid as it allows us to make
it editable again.

Fixes https://gitlab.com/kicad/code/kicad/issues/14079
2023-02-25 11:02:12 +00:00
JamesJCode 9dca70a773 Eeschema netlist output: Propagate NC across hierarchical schematics
Fixes #12580

Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.

Adds testing of pin types to netlist QA unit tests.
2023-02-25 00:02:46 +00:00
Jeff Young 2b96161d0e Log new undo record at the start of Change Symbols.
Also fixes a bug where the "screen" variable was used with stale
data.

Fixes https://gitlab.com/kicad/code/kicad/issues/14061
2023-02-24 22:41:46 +00:00
Jeff Young 5a12e5ee76 Only write included models if they have overridden parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13953
2023-02-24 20:31:35 +00:00
Jeff Young c188318174 Change strategy for committing values from SIM_MODEL propGrid.
Note that the PCB editor's propGrid doesn't seem to need this workaround,
but I haven't yet figured out what's different between it and the sim model
propGrid.

Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-02-24 14:22:00 +00:00
Jeff Young 200a06a677 Cleanup some dead code, and add a potentially needed fix for non-Mac.
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)
2023-02-24 12:44:55 +00:00
Jeff Young 8059edff0e Don't mess up user formatting if eval'ing didn't actually change value.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-24 12:44:55 +00:00
Jeff Young 71df3f9edb Don't allow extra text in Sim.* fields.
(In particular, the field name.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13996
2023-02-24 12:44:55 +00:00
Jeff Young be54ab396e Move selection shadows to overlay.
This change doesn't appear to have any effect, but I think it's
correct.
2023-02-24 12:44:55 +00:00
Jeff Young ddf8d115c4 Handle de-highlighting items outside selection when selection changes.
Also adds selection cleared event to handled events.

And a small performance boost to not scan items for selection changes
when find is not seleciton-based.
2023-02-24 12:44:55 +00:00
jean-pierre charras 2b3eb0b522 fix minor compil warnings 2023-02-23 09:50:28 +01:00
Jeff Young 4917abe655 Make sure whitespace at end of command doesn't mess up detection.
(Fixes the failing test case.)
2023-02-22 23:29:13 +00:00
aris-kimi 22bca5c2a0 Disable link maps by default and fix compile issue with lld linker
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.

Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.

xref: https://github.com/llvm/llvm-project/issues/60932

Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Stefan 04165b22d1 Altium Schematic Import: add note that blanket's are not yet supported 2023-02-22 23:10:40 +00:00
Fabien Corona cdbb868198 sim - allow users to delete several measurements at once 2023-02-22 19:27:20 +01:00
Fabien Corona 9006f38e70 sim - Don't allow user to delete the type-in measure entry 2023-02-22 19:27:20 +01:00
Fabien Corona 1170fb2e18 sim - don't create measurement duplicates 2023-02-22 19:27:20 +01:00
Fabien Corona aa006e9b91 sim - allow to add several measurements at once. 2023-02-22 19:27:20 +01:00
Mike Williams 959a19a461 Power Symbols: automatically fix mismatched legacy symbols, add tests
Has netlist generation test for legacy power symbols, and test for
fixing legacy mismatched power symbol text fields and invisible pin names.
2023-02-22 18:01:47 +00:00
Mike Williams 5995e0e516 Power Symbols: make value editable, use as netname
QA: update tests for editable power symbol values
2023-02-22 18:01:47 +00:00
Mike Williams ca5004b1d2 Power Symbols: rename IsPowerConnection to IsGlobalPower
It's kind of confusing because we have power type pins, and pins that
make global power nets as part of power symbols.
2023-02-22 18:01:47 +00:00
Mike Williams dd461d6ad6 Power Symbols: drop requirement for invisible pins 2023-02-22 18:01:47 +00:00
Jeff Young 6fcae34f6b Clear operating points on all sim types.
(We'll fill them back in if we have data.)

Also improves handling when a plot tab is closed.

Also fixes dirtying of the view for op changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/13990
2023-02-22 15:54:18 +00:00
Jeff Young fe2679d965 Implement default levels for JFETs, MOSFETs and MESFETs. 2023-02-22 15:54:18 +00:00
Fabien Corona ae3a5c1c5f sim - set the dialog list as read only 2023-02-22 15:54:49 +01:00
Fabien Corona f2419e9e9b sim - Fix power graphs 2023-02-22 13:18:12 +01:00
Jeff Young cb71ea872b Don't allow 0 field text size.
Fixes https://gitlab.com/kicad/code/kicad/issues/13987
2023-02-22 11:40:49 +00:00
Fabien Corona e24ddd0be4 ADDED: Measurement on power signals and integrals
Fixes #14028
2023-02-22 12:11:09 +01:00
Jeff Young f828d50cb0 Better processing of single-empty-row rule for measurements grid. 2023-02-22 10:45:27 +00:00
Jeff Young 5fa7be0320 Update signals after running a sim.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-22 10:45:27 +00:00
Jeff Young a126d961d8 More dead code removal and a bit of formatting and const& for strings. 2023-02-22 10:45:27 +00:00
Jeff Young 68fe146861 Remove most of SIM_VALUE in favour of good old wxString.
This allows us to save the user's intent, including units, formatting,
and crucially variable references.
2023-02-22 10:45:27 +00:00
Jeff Young 29f21cdde6 Terminology and more dead code. 2023-02-22 10:45:27 +00:00
Jeff Young 90adc26b73 Remove dead and redundant code. 2023-02-22 10:45:27 +00:00
Chris Morgan 80b55f5980 Symbol editor: simpler creation of a new derived symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13407
2023-02-22 01:49:46 +00:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Marek Roszko 39e69a3d29 Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14011
2023-02-21 20:26:41 -05:00
aris-kimi 543a3317b4 Fix typo 2023-02-21 18:01:13 +00:00
Jeff Young 761b59da90 Read and write user-defined signals and measurements to workbook file. 2023-02-21 13:32:01 +00:00
Jeff Young 7fd707952b Easier editing of new sim measurements. 2023-02-21 13:32:01 +00:00
Jeff Young 6fcb95b24e ADDED user-defined signals. 2023-02-21 13:32:01 +00:00
Jeff Young f6fcae479c Don't generate error messages fetching sim data we know isn't there. 2023-02-21 13:32:01 +00:00
jean-pierre charras b05b33a9ff Fix a compil issue with gcc12.2 and Coverity warnings. 2023-02-21 11:54:38 +01:00
Fabien Corona 3751b250c6 sim - fix a QA case for XSPICE 2023-02-20 19:40:59 +01:00
Fabien Corona 869447fedd sim - ngspice does not support .probe p(Adevice)
Fixes #13979
2023-02-20 19:30:45 +01:00
Fabien Corona 2a3b70b7eb sim - Remember the option to save powers
Fixes #13978
2023-02-20 19:30:45 +01:00
jean-pierre charras 31be74b8b3 Fix a few Coverity warnings 2023-02-20 09:25:01 +01:00
Marek Roszko d55e2049e5 Silence some warnings with static_casts 2023-02-18 23:36:50 -05: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 dffd2da8c8 Fix the shared_lock added and micro-opt the reindex 2023-02-18 11:28:19 -05:00
Fabien Corona facd50f4fd sim - missing assignment 2023-02-18 15:36:47 +00:00
jean-pierre charras 07f79208b9 Minor fixes: Coverity and compil minor warnings. 2023-02-18 13:04:43 +01:00
Fabien Corona 5482bc2905 sim - Check FindParam() results before using them 2023-02-18 12:54:55 +01:00
Fabien Corona f5902dad28 sim - don't write dc parameter twice 2023-02-18 10:07:29 +00:00
Fabien Corona fa0cc09917 sim - allow sources that are both AC and TRAN 2023-02-18 02:17:48 +00:00
Fabien Corona 39a1b14a0f sim: VSIN - allow user to specify a phase
TD is not the same as PHASE.
TD is the delay before the source turns on.
PHASE is ... the phase

If only TD is set, the signal starts later, but the phase is still 0 when compared to the t=0 of the simulation.
2023-02-18 00:38:46 +00:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
Jon Evans fc68b8d71a Make selected background layers translucent
We can't render them underneath other objects, but we can at least
make it possible to see other objects through them.
2023-02-16 22:45:29 -05:00
Alex bd4758e4df Keep image sizes when loading/saving 7.0- schematic file formats.
Previously, images were assumed to have 300 PPI density when loading from
schematic, but not after initial placement.
2023-02-17 03:53:44 +03:00
Alex ecb28ddf1c Prevent ghost image after canceling bitmap placement. 2023-02-17 03:53:44 +03:00
Jeff Young 8b1318c92f Update associated data structures after changing trace colour.
Also removes likely benign but never-the-less useless grid even processing
during rebuilding of the grids.

Fixes https://gitlab.com/kicad/code/kicad/issues/13956
2023-02-17 00:47:01 +00:00
Paweł Płóciennik 614755f24e Dialogs autocompletion with backspace support. 2023-02-16 23:28:27 +00:00
Jon Evans 053d20e13d Fix selection overlay being wiped when changing sheets 2023-02-16 17:14:08 -05:00
Jeff Young d5e50b70bb Display a generic "Value" column label when there are no cursors. 2023-02-16 16:55:26 +00:00
Jeff Young f50d114b27 Push gain & phase for .probe statements in AC analysis.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 16:14:25 +00:00
Jon Evans ec2fc161e1 Handle another case where schematic view was being cleared
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:25:18 -05:00
Jeff Young 5967ab9a4d Don't allow SCH_LABEL_LOCATE_ANY_T to steal SCH_LABEL_LOCATE_WIRE_T's items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13936
2023-02-16 13:21:00 +00:00
Jon Evans 955a5a13eb Symbol editor: stop removing overlay from view
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:17:12 -05:00
Jeff Young 95232edd0d Do a better job of looking for .probe commands in directives.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 12:42:54 +00:00
Jeff Young d8a4f9821e Smarten regex to accept ':' in signal names.
(In fact, just accept anything up to the closing paren.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13942
2023-02-16 12:20:55 +00:00
Jon Evans 0f18a36f8f Fix handling of selection overlay in schematic editor
We weren't actually using the overlay group at all

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11142
2023-02-15 21:16:58 -05:00
Seth Hillbrand a761b0e860 Force DNP X to foreground 2023-02-15 11:35:24 -08:00
Jeff Young c618bb7046 Correctly netlist a voltage source with both AC and DC values.
Fixes https://gitlab.com/kicad/code/kicad/issues/13912
2023-02-15 14:50:31 +00:00
Jon Evans e8a88411ea Set PPI properly in schematic bitmaps, too 2023-02-14 21:37:00 -05:00
Jeff Young 64f1808d60 Don't use the just-in-time model resolver when updating the dialog.
If it changes in the middle it will leave you in a world of hurt.

Also don't update the library after a loss-of-focus unless the path
really changed.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13854
2023-02-15 00:31:04 +00:00
Jon Evans 29c4482bc8 Symbol chooser: save UI settings even when canceled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13903
2023-02-14 18:26:29 -05:00
Jon Evans 0913552f84 Handle custom columns in symbol tree synchronizing adapter
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13907
2023-02-14 18:26:29 -05:00
aris-kimi dca1281263 Fix some typos 2023-02-14 23:47:05 +02:00
Mike Williams 18df4442bc Schematic: Find and Replace on Selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9293
2023-02-14 14:04:59 -05:00
Seth Hillbrand 9f8b25a0b0 Don't desaturate the selection shadow
Selection shadows are helpful when showing which elements are selected
and there is no benefit (and some downside) to having their color
removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/13878
2023-02-14 10:22:05 -08:00
Jeff Young 50eaba4211 Performance fix for switching pages. 2023-02-14 17:14:31 +00:00
Jeff Young 03484aedbc Workaround wxWidgets enforced min pen width by using transparent pen.
Also fixes some bugs in our shape printing code when a border is not
specified but a fill is.

Fixes https://gitlab.com/kicad/code/kicad/issues/13891
2023-02-14 14:44:04 +00:00
Mike Williams 76fb598ac2 Annotate: cleanup to use enum values instead of numbers 2023-02-14 08:21:43 -05:00
Mike Williams 4b07e3e413 Common Actions: Find Previous
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8968
2023-02-14 08:21:37 -05:00