Commit Graph

91 Commits

Author SHA1 Message Date
Jeff Young 201c34345f Fix sheet filename if it's missing extension.
Fixes https://gitlab.com/kicad/code/kicad/issues/8619
2021-07-01 15:43:19 +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 d296bec5b8 Differentiate aSingleLine mode for SCINTILLA_TRICKS
This allows us to avoid the monospaced font (along with the tab-stop
handling), and process a <return> as an OK rather than just <shift> +
<return>.

Fixes https://gitlab.com/kicad/code/kicad/issues/8425
2021-06-28 11:20:12 +01:00
Jeff Young 389287e942 A bit more Part -> Symbol. 2021-06-17 22:24:41 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04: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 3d0fe8e2c6 Only initialize VALIDATOR if we're using it.
It appears to get called by the wxWidgets framework sometimes even
when invisible/unenabled.

Fixes https://gitlab.com/kicad/code/kicad/issues/8483
2021-05-26 12:39:33 +01:00
Wayne Stambaugh 68085820ff Eeschema: fix value and footprint field update bug.
Don't assume all identical references should have the same value.
Filter by checking that only symbol units having the same reference
also have the same library identifier before updating the value and
footprint fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8313
2021-05-06 07:13:26 -04:00
jean-pierre charras cc43436df8 Eeschema: Fix a few issues in dialog edit fields
Partial fix of #8057
2021-03-28 18:23:35 +02:00
Jeff Young f0e6f812ff Edit One Field improvements.
1) Accept <enter> as OK if the multiline textbox isn't shown.
2) Focus and select all in first control if multiline textbox isn't shown.
3) Make title be title caps ("Edit Sheet name Field" looked dorky).

Fixes https://gitlab.com/kicad/code/kicad/issues/7940
2021-03-20 00:41:09 +00: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
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -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
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
Jeff Young ff7742c6b8 File naming and include cleanup. 2021-01-28 11:35:18 +00:00
Jeff Young 360953ba98 "comp" -> "symbol". 2021-01-19 23:50:40 +00:00
Jeff Young 753442c60a Don't select all of textfield on each focus.
GTK (at least) generates focus events when the app is reactivated so
the text keeps getting re-selected.

Fixes https://gitlab.com/kicad/code/kicad/issues/6757
2021-01-09 20:53:24 +00:00
jean-pierre charras 51f40a3f2b DIALOG_EDIT_ONE_FIELD: use a SCH_FIELD_VALIDATOR for mandatory fields.
These fields do not accept some chars, and must be filtered.
2021-01-04 16:03:04 +01:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young f0d0e17aab Prepare for MODULE -> FOOTPRINT. 2020-11-13 15:16:24 +00:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
Marek Roszko 14c18b7e64 Move ui functions out of common and into ui_common 2020-10-25 20:01:12 -04:00
Jeff Young 346b7178b7 Repair the way other units are collected when syncing symbol fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/6106
2020-10-24 22:39:53 +01:00
jean-pierre charras bda275de46 more cleanup about removing useless include 2020-10-03 11:48:16 +02:00
Jeff Young 7b05e456cc Bug fixes for multiple symbol instances in complex hierarchies
1) use SCH_COMPONENT::GetRef(), GetValue() and GetFootprint() when
instance-specific info is needed
2) update UpdateAllScreenReferences() to handle value and footprint.
3) BACKANNO is CvPcb's handler, not back annotation's handler.  Which
means it needs GUI behaviour, not back annotation behaviour.

Fixes https://gitlab.com/kicad/code/kicad/issues/5520
2020-09-06 13:57:14 +01:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Jeff Young f4ab14f32d Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
2020-08-10 12:41:52 +01:00
Jeff Young 0804f487ec Add text var cross-reference processing to SCH_FIELDs. 2020-07-30 14:27:42 +01:00
Jeff Young 55784afbfe Allow text variables to reference parent sheet's fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2466
2020-07-28 13:35:37 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

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

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

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jeff Young 6d56ba2072 Minor cleanup to edit label dialog. 2020-06-30 19:55:04 +01:00
Jeff Young 61b5a12362 Don't allow component & sheet field IDs to collide.
Fixes https://gitlab.com/kicad/code/kicad/issues/4748
2020-06-30 19:17:28 +01:00
Jeff Young 79cdd608af Make sure Footprint ID gets initialized when calling chooser.
Also make some of the labels in the dialog more explicit.
2020-06-09 20:10:39 +01:00
jean-pierre charras a29b3eb017 Eeschema, DIALOG_EDIT_ONE_FIELD: fix incorrect behavior for footprint field,
when initialized from the footprint viewer.

Fixes #4609
https://gitlab.com/kicad/code/kicad/issues/4609
2020-06-04 18:47:12 +02:00
Seth Hillbrand 21c752fa0b eeschema: Rename shadowing var 2020-06-01 09:58:07 -07:00
Jeff Young 5bfa06bb1c Coverity fix. 2020-05-28 10:38:40 +01:00
Jeff Young fe4fd19c66 Fix crash bug in unicode chars with Scintilla. 2020-05-28 00:23:18 +01:00
Jeff Young 8b084c373e Autocomplete for text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-27 23:29:51 +01:00
jean-pierre charras 029b1b0b22 Eeschema: void CollectOtherUnits(): do not try to collect others units
of a not annotated component.

Fixes #4142
https://gitlab.com/kicad/code/kicad/issues/4142
2020-04-01 16:03:22 +02:00
Jeff Young cbef95256b Share multi-unit updating code between Sym Props and Edit Field.
Fixes https://gitlab.com/kicad/code/kicad/issues/4103
2020-03-30 14:15:59 +01:00
jean-pierre charras cc47062b17 Fix a few Coverity issues 2020-03-23 16:17:22 +01:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young 3a1585718f Remove unnecessary casts (they're just casting to a superclass). 2020-01-12 20:26:07 +00:00
Ian McInerney b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00