Commit Graph

79 Commits

Author SHA1 Message Date
Jeff Young f3f57f77d9 Use STD_BITMAP_BUTTON for change symbols dialog. 2023-09-01 18:48:46 +01:00
Jeff Young 377ffb00b0 Re-run autoplacement after symbol replacement (when appropriate).
Also prevents an internal wxWidgets assert by clearing grid
selection before deleting rows.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15541
2023-08-31 23:28:59 +01:00
Wayne Stambaugh 1db9febcfe Remove duplicate references from change symbol dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15480
2023-08-25 14:08:21 -04:00
jean-pierre charras 53b2fda184 Fix some minor compil and Coverity warnings. 2023-08-17 10:06:17 +02:00
Mike Williams bdecdce1b4 Exclude from Sim: move from field to attribute 2023-08-08 12:36:36 -04:00
Ian McInerney bb4fb9088f Gracefully handle no symbols found in change symbols dialog
Fixes KICAD-2BJ
2023-06-29 23:21:15 +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
Ian McInerney 1f5719ef3a Pass proper parent to symbol viewer frame when changing symbols
Fixes sentry KICAD-1Z9
Fixes sentry KICAD-22J
2023-06-14 21:25:06 +01:00
Jeff Young 8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young dcfd426333 Upgrade some dialogs to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01: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
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 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 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
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 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
Marek Roszko d2c0f5fc2a More wxSing 2023-01-16 23:14:38 -05:00
Wayne Stambaugh d99e09014b Rename SYMBOL_INSTANCE_REFERENCE to SCH_SYMBOL_INSTANCE. 2023-01-04 15:39:50 -05: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
Jon Evans 7c71f65869 Add new field attributes to Update from Libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12839
2022-11-08 22:32:47 -05:00
Jeff Young fb48bef49f Formatting. 2022-09-11 23:13:37 +01:00
Jon Evans 371985b3e2 Autoplace fields if enabled after changing symbol 2022-09-11 10:11:25 -04:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
jean-pierre charras 20d1d0705e Fix a few issues related to field names and their translation. - Do not use translated field names outside strings displayed in dialogs. - fix code that does not work well with default locale. - fix some (not all) I18n issues in DIALOG_UPDATE_SYMBOL_FIELDS. 2022-05-13 11:45:37 +02:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
jean-pierre charras e218471d24 DIALOG_CHANGE_SYMBOLS: fix a bug introduced by my commit 686b32db
the filtering for mandatory fields was disabled.
2021-11-13 13:47:09 +01:00
jean-pierre charras 686b32dbd3 fix issue in DIALOG_CHANGE_SYMBOLS, in non English locale.
Mandatory field names where compared in list, using translated and not translated names.
Fixes #9596
https://gitlab.com/kicad/code/kicad/issues/9596
2021-11-11 10:56:09 +01:00
jean-pierre charras c3a4c40d4c DIALOG_CHANGE_SYMBOLS: add missing skip event in wxFocusEvents.
Fixes #9467
https://gitlab.com/kicad/code/kicad/issues/9467
2021-10-27 17:17:44 +02:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young 726f4d8016 Fix up some more cases of missing escaping for symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 16:40:38 +01:00
Jeff Young b1b4caee6a Escape "naughty" characters in symbol names.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road.  Better
to just escape them.

Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
Jeff Young e2a2c3282a Update fields list when source or target lib IDs change.
Fixes https://gitlab.com/kicad/code/kicad/issues/8263
2021-06-28 20:38:19 +01:00
Jeff Young e540752640 Allow all selected footprints/symbols to be changed.
Fixes https://gitlab.com/kicad/code/kicad/issues/7389
2021-06-17 23:34:56 +01:00
Jeff Young 389287e942 A bit more Part -> Symbol. 2021-06-17 22:24:41 +01:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Jeff Young f30c67a478 Symbols need to be unannotated when updating their references.
Fixes https://gitlab.com/kicad/code/kicad/issues/8223
2021-04-18 16:26:36 +01:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Wayne Stambaugh 7a00e01b3e Eeschema: fix false positive library symbol changed ERC errors.
This fix required sorting all of the LIB_PART draw items to ensure
accurate comparison between the symbols stored in the schematic and the
original library symbols.  This has a noticeable impact on symbol library
load performance.  It may also cause significant changes the next time
the library is saved due to changes in the draw item sorting.  Hashing
may be a better solution here but this addressed the immediate problem.

A skeleton method SCH_SCREEN::SwapSymbolLinks() was added because there
is most likely an issue with orphaned symbols in the schematic library
symbol cache during undo/redo operations.  More testing is required to
verify this.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7263
2021-03-04 17:59:24 -05:00
Jeff Young 8a33542bcd SCH_COMPONENT::GetField() expects a vector index, not a field id.
Check this at compile time.  Callers wanting to use an index now must
use SCH_COMPONENT::GetFields()[i] instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/7757
2021-02-28 15:10:37 +00:00
Jeff Young b8c95345d0 Make sure reporters have a better default path than /bin. 2021-02-25 15:05:26 +00:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
Jeff Young 781d293b60 Add option for text updating to Update Symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/6420
2021-02-22 00:36:40 +00:00