Commit Graph

2690 Commits

Author SHA1 Message Date
Jeff Young f4fa5bb0fc 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.
2023-05-04 00:08:18 +01:00
Jeff Young cd9196ddb9 Use fileds from flattened lib symbol when updating.
Fixes https://gitlab.com/kicad/code/kicad/issues/14577

(cherry picked from commit d816fb071f)
2023-04-26 13:04:05 +01:00
Seth Hillbrand 050f47daf1 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

(cherry picked from commit 6e8a5acc66)
2023-04-25 11:32:59 -07:00
Seth Hillbrand 683abd2029 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

(cherry picked from commit a154571438)
2023-04-25 11:32:04 -07:00
Jeff Young 4f9e754a51 Ignore empty field-name-templates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14552
2023-04-18 13:46:08 +01:00
Jeff Young 5574f35473 Apply symbol attributes from base symbol, not derived symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/13740

(cherry picked from commit d4b4abd001)
2023-04-15 22:31:49 +01:00
Jeff Young a51475a094 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)

(cherry picked from commit 8e29a054f3)
2023-04-13 13:47:21 +01:00
Seth Hillbrand 68dfcddbe9 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

(cherry picked from commit 16b4ec3c7e)
2023-04-12 16:10:50 +02:00
jean-pierre charras e991ae504b DIALOG_IMAGE_PROPERTIES: fix some issues:
- add missing panel_image_properties_base.fpb file
- fix not displayed image.
From master branch
2023-04-08 17:04:02 +02:00
Jeff Young 927b5ae707 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:28:11 +01:00
Jon Evans b0b9e66fad Move to requiring explicit action to save project settings
(cherry picked from commit 610e787ada)

Fixes https://gitlab.com/kicad/code/kicad/issues/14414
2023-03-24 11:49:50 -07:00
Jeff Young 9d457dc0ab Less nagging. (If we need a field name, then create one.)
Also cleans up empty fields when exiting the dialog.
2023-03-19 19:15:28 +00:00
Jeff Young 044c301d64 Remove accelerator keys from schematic find/replace dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14304

(cherry picked from commit afe813cae5)
2023-03-18 23:38:09 +00:00
Jeff Young 70e86434ef Manual cherry-pick of much of 6d296038f3 2023-03-17 14:12:58 +00:00
jean-pierre charras 69e9f4ada2 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 16:01:18 +01:00
Wayne Stambaugh d28cf632e4 Coverity fixes and code cleaning.
(cherry picked from commit a1fb8e1b1d)
2023-03-16 10:59:05 -04:00
Wayne Stambaugh 9e1fd16329 Coverity fixes and code cleaning.
(cherry picked from commit 4e99812145)
2023-03-10 11:21:19 -05:00
Salvador E. Tropea f135881bd6 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
2023-03-07 10:32:18 +00:00
Jeff Young a8f27d13e6 Use name (even for fallback models) *if* it's specified in dropdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425

(cherry picked from commit 7547e550aa)
2023-03-06 11:18:14 +00:00
Wayne Stambaugh 2c7f44f78d Coverity fixes and code cleaning.
(cherry picked from commit 789bf6455a)
2023-03-04 13:14:59 -05:00
Jeff Young e51d43568e Prefer Clamp() to std::min( std::max() ).
(cherry picked from commit d545216432)
2023-03-03 21:32:19 +00:00
Seth Hillbrand adc7a3ba4a Correct parent symbol for lib_text
The edited symbol should be pulled from the parent window when there is
not an existing text object

(cherry picked from commit 59fc62e898)
2023-03-03 12:40:56 -08:00
Jeff Young 8619705e44 Hook up AddField handler to GRID_TRICKS for SCH dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/git/14153
2023-03-02 18:16:02 +00:00
qu1ck 90eb5e9c31 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

(cherry picked from commit 2975f53647)
2023-02-28 16:48:28 -05:00
Seth Hillbrand 17c34c88dc 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

(cherry picked from commit 3207d1386e)
2023-02-28 13:42:51 -08:00
Jeff Young d028b381fa 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

(cherry picked from commit 281fde71b9)
2023-02-28 14:21:11 +00:00
Jeff Young 4ffe742b69 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

(cherry picked from commit 2b96161d0e)
2023-02-26 21:58:57 +00:00
Jon Evans d08157f7db Re-disable validator for VALUE and add comment explaining it 2023-02-25 08:05:42 -05:00
Jon Evans 981bf328ae Value field needs to use the normal text control
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14056
2023-02-24 22:18:31 -05:00
Jeff Young eccf9eb4a4 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

(cherry picked from commit c188318174)
2023-02-24 20:47:22 +00:00
Jeff Young 39403fa885 Cleanup some dead code, and add a potentially needed fix for non-Mac.
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)

(cherry picked from commit 200a06a677)
2023-02-24 20:47:22 +00:00
Jeff Young 7f6cb9b07b 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.

(cherry picked from commit 68fe146861)
2023-02-24 20:47:22 +00:00
Jeff Young 38e5da724d Remove dead and redundant code.
(cherry picked from commit 90adc26b73)
2023-02-24 20:47:22 +00:00
Jeff Young 51d0b8d2b5 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

(cherry picked from commit 5967ab9a4d)
2023-02-22 18:04:23 +00:00
Jeff Young 2f8615c6c4 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

(cherry picked from commit 64f1808d60)
2023-02-22 17:53:10 +00:00
Fabien Corona c00a98fed4 Revert "sim - Remember the option to save powers"
This reverts commit 74dcc1b9d5.
2023-02-20 20:59:52 +01:00
Fabien Corona 74dcc1b9d5 sim - Remember the option to save powers
Fixes #13978


(cherry picked from commit 2a3b70b7eb)
2023-02-20 19:38:19 +00:00
Marek Roszko 5d793193e0 Fix crash by using a shared_mutex to read/write lock the nickIndex
Fixes sentry kicad-ax
2023-02-18 13:02:25 -05:00
Jeff Young 7816652078 Account for border when calculating text margin for text boxes.
Also fixes some unnoticed issues with the textbox dialogs (probably
dating from the move to wxWidgets 3.2).

Fixes https://gitlab.com/kicad/code/kicad/issues/13877
2023-02-13 17:07:42 +00:00
Jeff Young 49938cfd09 Fix layout issue in IBIS fields. 2023-02-13 12:42:42 +00:00
Jeff Young 53a4ed6b24 ReadDataFields must be a separate step from Create.
Create() is done without execption processing, while ReadDataFields
should have exception processing.

(This also fixes a case where exception processing on ReadDataFields
was missing.)

Also fixes a bug where the pinSelect menu wasn't checked for -1 before
fetching.

Fixes https://gitlab.com/kicad/code/kicad/issues/13856
2023-02-13 12:42:42 +00:00
Paweł Płóciennik 06e3e63b96 Eeschema: text properties: reference field autocomplete ignores first char. 2023-02-10 21:56:03 +00:00
Marek Roszko c22fb390ec Set the text proeprties grid bag to avoid reserving space for hidden cells 2023-02-09 23:04:51 -05:00
Wayne Stambaugh baeeeec492 Fix broken update symbol from library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13782
2023-02-05 10:36:18 -05:00
Jeff Young 9be872a85a Better bounds checking for DIALOG_SIM_MODEL::curModel().
Fixes https://gitlab.com/kicad/code/kicad/issues/13767
2023-02-04 20:16:50 +00:00
Jeff Young f588da2bef Bounds checking for DIALOG_SIM_MODEL::curModel(). 2023-02-04 19:17:13 +00:00
jean-pierre charras 6b5eeeb861 Preferences dialog: try to reduce its width, in non English languages.
Remove some useless spacers, and do not force some widgets to have a to
large size (by removing empty areas).
Work in progress: one panel is still too big.
2023-02-04 14:36:14 +01:00
Jeff Young 71b8a2112c Coverty fixes. 2023-02-03 15:09:24 +00:00
Wayne Stambaugh a94d8a7e78 Use references instead of copies in map pair for loops. 2023-02-03 10:00:09 -05:00
Wayne Stambaugh c88c4e1200 Fix schematic update library symbols issues.
Rather than update library symbols one at a time, queue them up by
schematic symbol to prevent multiple updates to the same symbol in
complex hierarchies.  This also removes all of the library symbols
first which will clear out all of the library symbol variants that
were created by modifying library symbols in place and/or changes to
the symbol in the library.

Don't add new variant library symbol if an equivalent variant already
exists in the schematic local cache.  This prevents duplicate library
symbols from being added to the local cache when the first variant in
the cache does not match that of the symbol being added.
2023-02-02 15:54:24 -05:00