Commit Graph

1584 Commits

Author SHA1 Message Date
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
Jon Evans bd19c580f4 Add configuration for cross-probing behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2317
2020-06-27 22:48:48 -04:00
Jeff Young 32c3ea4edd Flags cleanup.
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).

Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.

Remove obsolete HIGHLIGHT infrastructure (we now use selection).

Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Wayne Stambaugh 2078e629c5 Eeschema: allow editing of junction properties diameter and color.
Add missing plot and print changes for the new bus entry properties.

ADDED: Junction properties diameter and color can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4593
2020-06-24 13:36:17 -04:00
Wayne Stambaugh 853cf2c9b9 Eeschema: make bus wire entry properties editable.
CHANGED: Bus to wire entry object properties line color, width, and style
can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4591
2020-06-24 13:36:17 -04:00
Jon Evans 202b55f4d2 Plot sheet background colors if present
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4697
2020-06-21 20:43:47 -04:00
Jon Evans dd42a19319 Prevent grid axes from inadvertently turning on in eeschema
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4680
2020-06-19 17:22:25 -04:00
Jon Evans 6d2f30005e Don't blow up the sheet path when selecting an ERC item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4685
2020-06-19 17:00:41 -04:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
jean-pierre charras a8d5d9b690 panel lib tables: avoid crash when deleting the last entry in list. 2020-06-14 17:39:32 +02:00
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Seth Hillbrand a02d8a5993 Fix a number of signed/unsigned comparisons 2020-06-13 11:55:59 -07:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Ian McInerney a97f14e217 Propagate exclude from board to all units of a component
Fixes https://gitlab.com/kicad/code/kicad/issues/4650
2020-06-12 14:26:11 +01:00
Wayne Stambaugh 037898f6fb Eeschema: add support for excluding symbols from board.
ADDED: Support for excluding symbols from board during.  This allows for
creating bill of materials only symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2522
2020-06-10 10:57:28 -04: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 2401ed587e eeschema, pcbnew: fix too narrow window showing the item color list
Fixes #4610
https://gitlab.com/kicad/code/kicad/issues/4610
2020-06-09 20:05:38 +02:00
jean-pierre charras 64231a8491 fix a minor wxWidgets alert and a outdated comment. 2020-06-09 14:12:38 +02: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
Wayne Stambaugh 0032845f9e Fix clipped bitmap buttons with GTK on Linux.
A note to developers, please do not set the minimum and/or size of bitmap
buttons.  It causes bitmaps to get clipped using GTK on Linux.  If the
bitmap button size is not acceptable, then supply an appropriately sized
bitmap rather than attempt to force the wxWidgets sizing mechanism to do
what you want.  This almost always causes platform differences that do
not work well.
2020-06-03 14:01:44 -04:00
Wayne Stambaugh 77a59fb5d3 Eeschema: add support for excluding symbols from bill of materials.
This provides a method to add symbols that represent footprints on the
board that do not have an associate component such as mounting holes,
fiducials, logos, etc that should be excluded from the bill of materials.
It also prevents those footprints from being removed from the board
accidentally when updating the board from the schematic.

ADDED: Support to exclude schematic symbols from bill of materials
export.
2020-06-03 08:55:13 -04:00
Jeff Young 5d493abea7 Check for duplicate field names.
Fixes https://gitlab.com/kicad/code/kicad/issues/4219
2020-06-02 21:44:03 +01:00
Jeff Young c01046c12f Give new sheets an initial name and filepath.
Fixes https://gitlab.com/kicad/code/kicad/issues/4516
2020-06-02 20:28:20 +01:00
Wayne Stambaugh 354d53a6c5 Handle derived library symbol optional field inheritance.
CHANGED: Derived library symbols will inherit optional fields defined by
their parent symbol and override existing optional fields.

CHANGED: The symbol editor will now only display the fields defined in
derived symbols rather than show mandatory fields inherited from the
parent symbol.  Showing fields that cannot be edited would be confusing.
2020-06-02 14:21:11 +00:00
Wayne Stambaugh 52078a4b1b Allow setting mandatory derived symbol field properties.
CHANGED: All mandatory fields in derived symbols can be edited.  This
not only includes the field value but also all text properties.

Kill the dual datasheet variable storage which caused many datasheet
bugs over the years.  The datasheet is now always stored in the data
sheet field.
2020-06-02 14:21:11 +00:00
Seth Hillbrand 21c752fa0b eeschema: Rename shadowing var 2020-06-01 09:58:07 -07:00
jean-pierre charras eae0c142fe Eeschema, DIALOG_PLOT_SCHEMATIC: fix incorrect unit of default pen width.
The default line width used to set the  default pen width is given in mils,
and the conversion to iu was missing.
Fix also a minor Coverity warning.

Fixes #4594
https://gitlab.com/kicad/code/kicad/issues/4594
2020-06-01 16:08:46 +02:00
Jeff Young adb1074597 Add undo for Edit Text & Graphics Properties. 2020-05-31 00:01:55 +01:00
Jeff Young 3425deff47 Hook up Edit Text and Graphics Properties to wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/1974
2020-05-31 00:01:55 +01:00
jean-pierre charras e8c1738361 dialog_edit_label.cpp: fix a minor compil warning (shadowed var) 2020-05-29 20:16:03 +02:00
Wayne Stambaugh b624c7090a Deprecate saving legacy schematic and symbol library file formats.
REMOVED: The ability to save schematics in the legacy file format.
2020-05-29 12:43:00 +00:00
Jeff Young 790b061b8b Make sure all plotters have a RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/4556
2020-05-28 20:16:36 +01:00
Jeff Young 9f2be3714f Add unresolved variable testing for worksheet items. 2020-05-28 17:36:22 +01: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 f971e1267b Fix typo and remove a I18N marker in a sentence containing keywords
(keywords cannot be translated)
Fix also use of a deprecated constant.
2020-05-26 17:47:58 +02:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Jon Evans 2164501b06 Don't reparent symbol fields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4540
2020-05-25 17:47:50 -04:00
Jon Evans 4a8d5a2e6c Fix missing include 2020-05-24 10:55:37 -04:00
Jon Evans 1e69f592f6 Rework net highlighting to use connections instead of strings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1933
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3921
2020-05-24 10:46:05 -04:00
Jon Evans a63df2fbf0 Remove BuildNetListBase from netlisting paths 2020-05-23 13:14:05 -04:00
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +01:00
Jeff Young 70fb5cac96 Flatten one level of showElectricalTypes settings. 2020-05-23 16:50:33 +01:00
jean-pierre charras 17fad3a9a4 Minor cosmetic fix and enhancement is 2 dialogs. 2020-05-23 09:48:05 +02:00
Michael Kavanagh a6ec225f43 Eeschema sheet pin properties: use combobox
Prepopulate with hierarchical labels within the sheet.
Update connection type to match hierarchical label.
2020-05-22 19:56:16 +00:00
Jon Evans 2499a1d640 Remove KIWAY dependence from SCH_PLUGINs 2020-05-20 23:00:23 -04:00
Jon Evans fbc42a8cb5 Move schematic defaults to SCHEMATIC and add some missing settings entries 2020-05-20 00:03:23 -04:00
Jon Evans f4d7c323f5 Coverity fixes 2020-05-18 22:58:28 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Jon Evans d599648ec7 ADDED: Enable color themes for schematic printing 2020-05-16 13:19:43 -04:00
Jon Evans 42319e57c6 Clean up libedit color settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4433
2020-05-16 09:24:12 -04:00
Jeff Young ba301c292a Check for single item seletion for most property dialogs. 2020-05-13 13:42:23 +01:00
Jeff Young 724c669434 Move a few more commands to tool framework. 2020-05-12 18:12:38 +01:00
Jeff Young 1a1ecd8ce1 Rearrange some code to keep from hitting a wxGrid d'tor bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/4384
2020-05-10 19:42:45 +01:00
Jeff Young cbe4b79107 Add syntax help for bus definitions (and upgrade parser to handle them).
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
2020-05-10 18:40:06 +01:00
Jeff Young cc1ebca242 Add syntax help to pin dialogs. 2020-05-10 18:40:06 +01:00
Jeff Young f3a5f5b6ca Don't resync the screen before we've changed it back.
Fixes: lp:4382
* https://bugs.launchpad.net/kicad/+bug/4382
2020-05-10 18:40:06 +01:00
Jeff Young 8ef66732e4 Add syntax help for text markup.
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
2020-05-08 23:30:33 +01:00
Jeff Young 3c3984a6fc Generalize default footprint fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2289
2020-05-08 23:30:33 +01:00
Wayne Stambaugh 61e981be17 Symbol editor: fix broken alternate body style toolbar state.
Fixes https://gitlab.com/kicad/code/kicad/issues/4329
2020-05-07 15:55:04 -04:00
Jeff Young f0cda374a0 A few more visual adjustments to the new note text. 2020-05-07 17:51:27 +01:00
Wayne Stambaugh 26803f54f0 Eeschema: fix sheet file extension warning.
Fixes https://gitlab.com/kicad/code/kicad/issues/4351
2020-05-07 10:28:47 -04:00
Jeff Young 241fc3166b Implement a symbol type filter for Edit Text and Graphics.
Fixes https://gitlab.com/kicad/code/kicad/issues/4334
2020-05-06 22:57:14 +01:00
Jeff Young d56dced0ab Fix dialog grow behaviour. 2020-05-06 20:38:12 +01:00
jean-pierre charras 54caebb04a Fix translation issues and a typo 2020-05-06 20:41:29 +02:00
Jeff Young 001a50bf14 Moved PANEL_COLOR_SETTINGS from buttons to swatches.
This allows us to correctly display non-100%-opacity colors (ie:
over the correct background color).
2020-05-06 19:02:21 +01:00
Jeff Young 7d7e0143e4 Fix note text to correct location of text offset ratio property.
Fixes https://gitlab.com/kicad/code/kicad/issues/4323
2020-05-06 15:48:58 +01:00
Wayne Stambaugh d0c3c11e59 Eeschema: fix crash when resetting schematic symbol fields from library.
Fixes https://gitlab.com/kicad/code/kicad/issues/4336
2020-05-06 10:43:08 -04:00
Jeff Young 9e4125c451 Add note on spacing to Global Label Properties dialog.
Also cleans up some of the other notes to have a uniform presentation.

Fixes https://gitlab.com/kicad/code/kicad/issues/4323
2020-05-05 20:33:20 +01:00
Jeff Young 67bccaf465 Make indeterminate control states clearer for the user.
Fixes https://gitlab.com/kicad/code/kicad/issues/4313
2020-05-05 20:26:51 +01:00
Wayne Stambaugh a06fa22b8a Eeschema: remove rogue calls to SCH_SCREEN::UpdateSymbolLinks().
SCH_SCREEN::UpdateSymbolLinks() should only be called when working with
the legacy schematic file format.  Add schematic symbol library symbol
links should be set using SCH_COMPONENT::SetLibSymbol() which updates
the symbol link and pin map accordingly.

Change the schematic symbol LIB_ID edit dialog to properly use the new
SCH_COMPONENT::SetLibSymbol() function.
2020-05-05 12:52:17 -04:00
Wayne Stambaugh 5cf474e1c8 Eeschema: fix bugs in symbol edit properties dialog.
Use flattened (root) library symbols to prevent broken library symbols
in schematic files.

Remove the edited symbol from screen before making changes to the symbol
to prevent potential orphaned symbol libraries being saved in schematic
file.

Add some defensive programming to let developers know that an invalid
library symbol link was used when calling SCH_COMPONENT::SetLibSymbol().
2020-05-05 10:56:23 -04:00
Wayne Stambaugh 169f63a6c0 Eeschema: make schematic sharing truly safe across all designs.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects.  It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic).  This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet.  This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references.  It also allows the root schematic from one project
to be uses as a sub-sheet in another project.

When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs.  This is done to ensure there
are no sheet path instance clashes between projects.  That being said,
there are no checks for this.  It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
2020-05-04 12:40:03 +00:00
Wayne Stambaugh 7183e9f97e Make the new schematic and symbol library file formats the default.
This is a very large and potentially disruptive change so this will be an
unusually long and detailed commit message.

The new file formats are now the default in both the schematic and symbol
library editors.  Existing symbol libraries will be saved in their current
format until new features are added to library symbols.  Once this happens,
both the legacy schematic and symbol file formats will be no longer be
savable and existing libraries will have to be converted.  Saving to the
legacy file formats is still available for round robin testing and should
not be used for normal editing.

When loading the legacy schematic file, it is imperative that the schematic
library symbols are rescued and/or remapped to valid library identifiers.
Otherwise, there will be no way to link to the original library symbol and
the user will be required manually set the library identifier.  The cached
symbol will be saved in the schematic file so the last library symbol in
the cache will still be used but there will be no way to update it from the
original library.

The next save after loading a legacy schematic file will be converted to
the s-expression file format.  Schematics with hierarchical sheets will
automatically have all sheet file name extensions changed to .kicad_sym
and saved to the new format as well.

Appending schematics requires that the schematic to append has already been
converted to the new file format.  This is required to ensure that library
symbols are guaranteed to be valid for the appended schematic.

The schematic symbol library symbol link resolution has been moved out of
the SCH_COMPONENT object and move into the SCH_SCREEN object that owns the
symbol.  This was done to ensure that there is a single place where the
library symbol links get resolved rather than the dozen or so different
code paths that previously existed.  It also removes the necessity of the
SCH_COMPONENT object of requiring any knowledge of the symbol library table
and/or the cache library.

When opening an s-expression schematic, the legacy cache library is not
loaded so any library symbols not rescued cannot be loaded.  Broken library
symbol links will have to be manually resolved by adding the cache library
to the symbol library table and changing the links in the schematic symbol.

Now that the library symbols are embedded in the schematic file, the
SCH_SCREEN object maintains the list of library symbols for the schematic
automatically.  No external manipulation of this library cache should ever
occur.

ADDED: S-expression schematic and symbol library file formats.
2020-05-04 12:40:03 +00:00
jean-pierre charras 12d1d3a844 Pcbnew: fix not wanted changes in .kicad_pcb files when the board has no changes.
Some items (tracks and footprint graphic items) when reading were added in reverse order
of the initial file, creating useless differences and breaking source comparisons.
2020-05-04 14:01:35 +02:00
Jeff Young c155d80213 User configurability of pin electrical symbol size.
Also fixes a bug where a bunch of eeschema settings weren't getting
loaded because it looked like they were larger than the max value
(which wasn't being scaled from mils to internal units).

Fixes https://gitlab.com/kicad/code/kicad/issues/2089
2020-05-04 00:56:32 +01:00
Jeff Young da1a89fc7e Allow users to control the order of sheets through sheet fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2394
2020-05-03 23:27:30 +01:00
Wayne Stambaugh c9d549ffba Eeschema: minor update symbol fields dialog layout improvements. 2020-05-03 08:40:31 -04:00
Wayne Stambaugh 1c82fc9465 Eeschema: minor sheet properties dialog layout improvements. 2020-05-03 08:24:08 -04:00
Wayne Stambaugh 055ab92797 Fix symbol library table dialog padding. 2020-05-02 18:42:45 -04:00
Jeff Young 9d6b987ecc Fixes to map pin-to-pin erorrs to new Warning/Error strucutre. 2020-05-01 18:49:42 +01:00
jean-pierre charras b26e9520b3 DIALOG_EDIT_SHEET_PIN: allows only the text size to be edited (and sizeX = sizeY).
In Eeschema, texts are expected to have the same size X and size Y.
So we cannot set 2 different values for X and Y pin size:
- only size X is saved in file
- 2 different values for X and Y create bad look for pin + associated graphic symbol
Allowing separte values need a file format change *and* a code change.
2020-04-30 10:33:53 +02:00
Jeff Young 1daa2224d0 Tidy up the layout of the Colors Editor. 2020-04-27 11:59:57 +01:00
Jeff Young 32db9eb0f1 Add some distances to a few DRC errors. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jon Evans 69db66e1ea Fix saving of pcbnew colors when edited from layers widget 2020-04-23 22:33:02 -04:00
Jon Evans 2d95270a31 Add color theme settings to pcbnew 2020-04-23 21:55:29 -04:00
Jeff Young 615ad9abfc Check sheet file extension when editing, and add if missing when reading.
Fixes https://gitlab.com/kicad/code/kicad/issues/4107
2020-04-22 21:27:33 +01:00
Jeff Young fe383efb93 That gcc is a squirrelley beast... 2020-04-22 12:35:32 +01:00
Jeff Young 1fdaac3440 Safer way to do std::string conversions. 2020-04-22 12:31:06 +01:00
Jeff Young 857aca78cd More std::string vs. wxString compile issues. 2020-04-22 12:28:25 +01:00
Jon Evans 61f28f0958 Fix build error on gcc 2020-04-21 19:29:34 -04:00
Jeff Young 93d0f19e3f Fix compile error on linux (perhaps all gcc platforms?). 2020-04-21 22:53:33 +01:00
Jeff Young f3a2495757 Fix compile issue on GTK (or possibly just with some versions of wxWidgets). 2020-04-21 22:19:36 +01:00
Jeff Young 1916ea868b Highlight current row in Edit Symbol Fields, and save col widths.
Fixes https://gitlab.com/kicad/code/kicad/issues/4235
2020-04-21 21:17:59 +01:00
Jeff Young 7e4d255cdd Apply Scintilla hack to get auto-sizing canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-19 20:09:43 +01:00
Jeff Young 895f46da8f Another attempt to fix the textbox scrollbars on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-18 21:41:20 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 42cd604c3c Expose Show Hidden Fields to GUI.
Fixes https://gitlab.com/kicad/code/kicad/issues/2010
2020-04-18 16:36:51 +01:00