Commit Graph

6197 Commits

Author SHA1 Message Date
Jon Evans b0c6a0f9ef Allow sheet colors to remain unspecified if not manually set
This way, when the user changes their color theme, any sheets
that did not have a specific color set will change with the theme.

Also add a button to clear color overrides from a sheet, because
any schematics that have been saved before this change will have
the colors set to something other than UNSPECIFIED.
2020-07-29 21:16:07 -04:00
jean-pierre charras 98b1f55e29 Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
Gives also to functions GetText() and GetBitmap() a more significant name.

Fixes #5007
https://gitlab.com/kicad/code/kicad/issues/5007
2020-07-29 17:04:52 +02:00
jean-pierre charras f00c59c446 Fix a few Coverity warnings. 2020-07-29 09:26:57 +02:00
Marek Roszko 9278660b10 Add support for the windows application restart api 2020-07-28 14:32:39 -04: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
jean-pierre charras 039b6fd5cf Eeschema plot: do not plot the hierarchy sheet symbol background in B&W mode.
if the the hierarchy sheet symbol background is not white, in B&W mode it is black,
and texts are not readable.

Fixes #4987
https://gitlab.com/kicad/code/kicad/issues/4987
2020-07-28 10:13:56 +02:00
Jeff Young b74e125264 Read/write schematic netclass properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/4990
2020-07-27 23:10:46 +01:00
Jeff Young 4479fcc6dc Give HardReset() a better chance of success. 2020-07-27 21:55:08 +01:00
Jeff Young 97964b2a4c Use netclass colour for junction dots and when printing/plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/4986

Fixes https://gitlab.com/kicad/code/kicad/issues/4982
2020-07-27 21:47:05 +01:00
Jeff Young 8a9fa53cd7 Clear annotations by default on copy/paste.
Folks didn't seem to like the "only clear when there are collisions"
behaviour.  Paste Special remains available to "force keep".

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4744
2020-07-27 19:53:42 +01:00
Mark Roszko 8324cb30b7 Save the wxDisplay index to set the position of windows correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4338
2020-07-27 02:53:56 +00:00
Mark Roszko 7bdb98f961 libedit: Make context menu follow context 2020-07-26 20:16:38 +00:00
Jeff Young 864087890b Fix typo assuming new field value was always the name.
Fixes https://gitlab.com/kicad/code/kicad/issues/4936
2020-07-22 15:10:54 +01:00
Jon Evans 9a801d8b72 Don't disrupt diff pairs when auto-renaming buses
With bus groups we can use the prefix to disambiguate

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4916
2020-07-20 20:41:56 -04:00
Fabien Corona a1437f4a95 Eeschema : Add A5 sheet size 2020-07-21 00:00:36 +00:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Mark Roszko 3b727b5d16 Make preference groups not selectable 2020-07-20 13:45:46 +00:00
jean-pierre charras 1d450adfdf Eeschema: fix crash when trying to save as a library in a non writable folder.
The crash was due to a non caught thrown error.

Fixes #4914
https://gitlab.com/kicad/code/kicad/issues/4914
2020-07-19 18:27:19 +02:00
Ian McInerney ae45c08ce4 Fix label creation for new netname driven from a pin
LIB_PIN is never used in the connectivity calculation,
so it should use SCH_PIN instead. Additionally, the label
orientation should take into account the orientation of
the component to ensure they don't overlap.
2020-07-19 01:52:34 +01:00
Ian McInerney 50b2271f84 Fix missing variable initialization 2020-07-18 23:56:39 +01:00
Jeff Young 1e9d947598 Save MRU path when doing a library Save As....
Fixes https://gitlab.com/kicad/code/kicad/issues/4910
2020-07-18 15:26:11 +01:00
Ian McInerney cc688a3e1d Initialize variables properly
Fixes https://gitlab.com/kicad/code/kicad/issues/4919
2020-07-18 00:36:47 +01:00
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jeff Young 33480ecad1 Show all symbol libraries by default.
Also fixes an issue where the plugin wasn't getting reset if the
library type was changed.
2020-07-17 18:33:14 +01:00
Jeff Young 944c9eac7c Allow Update Schematic from PCB to re-link based on refdes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00
jean-pierre charras 6296b4e20b Kicad manager: create a minimal .kicad_pro file when creating a project from scratch.
Fixes #4889
https://gitlab.com/kicad/code/kicad/issues/4889
2020-07-16 11:31:39 +02:00
Wayne Stambaugh 0ab8b9a2d9 Symbol editor: fix assertion attempting to copy an inherited symbol.
Copying or cutting an symbol to the clipboard using the context menu
in the library tree requires a root symbol.  Inherited symbols must
be flattened in order to properly be added to a symbol library.

Fixes https://gitlab.com/kicad/code/kicad/issues/4901
2020-07-15 20:57:34 -04:00
Jeff Young 11ca21039a Clear new flag when creating image pins.
Otherwise if you then move it we'll think it needs to be inserted
and end up with a circular drawings list.

Fixes https://gitlab.com/kicad/code/kicad/issues/4622
2020-07-16 01:39:29 +01:00
Jeff Young e8079bf655 Make sure UI gets adjusted for Symbol property changes.
For instance, if the number of units is changed from 1 to not-1
or vice versa then we need to rebuild the units selector.

Fixes https://gitlab.com/kicad/code/kicad/issues/4622
2020-07-16 01:39:29 +01:00
Wayne Stambaugh 729dc75396 Symbol editor: fix copy/cut and paste bug.
Use the s-expression symbol library file format for copy/cut to clipboard
instead of legacy symbol file format when using the library tree context
menu copy and cut entries.  Also use s-expression file format for parsing
clipboard contents using the context menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/4900
2020-07-15 20:23:10 -04:00
Ian McInerney af729d578f Unify settings reset buttons into one location 2020-07-16 00:08:16 +01:00
Jeff Young 19d0899a80 Fix previous botched attempt to deal with duplicate field ids.
Fixes https://gitlab.com/kicad/code/kicad/issues/4821

Fixes https://gitlab.com/kicad/code/kicad/issues/4891
2020-07-15 13:51:12 +01:00
Jeff Young 1dc804232c Fix issue with duplicate field IDs getting saved out.
Fixes https://gitlab.com/kicad/code/kicad/issues/4821
2020-07-14 16:00:38 +01:00
Seth Hillbrand 7f991ce855 Revert "Set DoubleBuffering to reduce flicker"
This reverts commit 106259f6e6.
2020-07-13 20:23:12 -07:00
Seth Hillbrand e19a7910f8 Revert "Revert "Set DoubleBuffering to reduce flicker""
This reverts commit c18cab6154.
2020-07-13 20:19:10 -07:00
Jeff Young dd61f6f019 Use pin graphic only for rubber-band selection hit-testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/4138
2020-07-13 22:41:56 +01:00
Jeff Young 1cd2a51db2 Make undo/redo lists protected. 2020-07-13 15:53:36 +01:00
Jeff Young fa9937701f Undo for Edit Component's LibId. 2020-07-13 14:16:21 +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
Seth Hillbrand 9f09c3872f Ensure file reads always use the C-locale variant
Str2Double assumes current locale.  We usually switch the locale when
reading files but we should be using the function that explicitly gets
the C-locale conversion.
2020-07-12 20:03:50 -07:00
Jon Evans a2041073ee Skip project backup in standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4867
2020-07-12 11:42:05 -04:00
Jeff Young 9b92b275de Remove vestiages of old open-PCB-for-settings hack.
We used to have to open a PCB_EDIT_FRAME to get the settings for
the footprint editor and footprint viewer.  This necessitated some
special processing when opening a PCB_EDIT_FRAME to actually edit
a board as it might already be open but unloaded.

Since the new settings architecture allows the footprint editor and
footprint viewer to init themselves we no longer need the special-
case code.
2020-07-11 21:19:49 +01:00
Jeff Young e325d2e18f Allow Net Inspector to create, rename and delete nets.
ADDED: create/edit/delete nets in PCBnew Net Inspector
ADDED: update from PCB now allows updating of changed nets

Fixes https://gitlab.com/kicad/code/kicad/issues/1996
2020-07-11 21:19:49 +01:00
Seth Hillbrand c18cab6154 Revert "Set DoubleBuffering to reduce flicker"
This reverts commit 106259f6e6.

In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785

Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07:00
Seth Hillbrand 106259f6e6 Set DoubleBuffering to reduce flicker
This sets double buffering for GTK and MSW to minimize flicker when
redrawing window elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/4785
2020-07-10 09:29:42 -07:00
Jon Evans 4a5792cb87 Fix bus unfolding in the wake of bus entry changes
Since bus entry shape is not a thing anymore,
unfolding routine can be simplified to just use size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4853
2020-07-09 18:51:42 -04:00
Jon Evans 66bdd37637 Connectivity optimizations
Cache names of potential driving items
Change a few data structures based on profiling
2020-07-09 18:14:37 -04:00
Jon Evans fc92fb076e Cache sheet path to string conversion in UpdateSymbolInstances
Profiling of large designs (with many hierarchical sheets)
showed that this can be a huge (4x) speed up to schematic
loading times.
2020-07-09 18:14:37 -04:00
Jon Evans b1b9cef5fb Full-project automatic backup system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4763
2020-07-09 13:55:19 +00:00
Jon Evans 282fcd5f3c Connectivity optimizations
Don't copy the recursion test cache when copy-constructing
SCH_SHEET_PATHs as it's not needed in connectivity

Fix a few places that were copying unnecessarily
2020-07-08 17:42:12 -04:00
Jeff Young 741481591e NetClass settings for Eeschema.
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.

Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Jeff Young d292db866a Fix mismatch between dialog and code.
(The code was updated to use INDETERMINATE_ACTION, but the dialog
wxChoice still specified an entry of "...".  This moves both to the
code so it's harder for them to get out of sync.)
2020-07-08 19:31:44 +01:00
Wayne Stambaugh 41dd31babf Symbol editor: fix unnecessary "Save As..." prompt.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4818
2020-07-08 14:06:10 -04:00
Ian McInerney 37ce9fb847 Tell wx that we really want a transparent background
Try more options for telling wxWidgets that we want the area
to have a transparent background. Also, fix some spacing issues.

Fixes https://gitlab.com/kicad/code/kicad/issues/4842
2020-07-08 16:29:04 +01:00
Wayne Stambaugh 4c383c51fa Eeschema: add update symbol from library command to context menu.
Rather than displaying dialog that has every update option possible like
updating footprints in the board editor, this change updates the library
symbol immediately using the symbol library identifier and requires no
additional input from the user.

ADDED: Context menu entry for schematic symbols to update the symbol from
the symbol library using the existing library identifier.
2020-07-08 10:15:24 -04:00
Jon Evans 7f1e1a4abb Fix missing pin table visible columns setting
This got missed in the settings merge
2020-07-07 20:59:55 -04:00
Jon Evans 788f31d743 Fix import of Eagle schematics
Old project needs to be unloaded before schematic is reset,
then new project has to be loaded before doing the import

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4836
2020-07-07 20:48:32 -04:00
Ian McInerney 908377f9c4 Remove incorrect factor of 2 scaling
This was a copy-paste error that caused the junction dots
to be twice as small as they should be.

Fixes https://gitlab.com/kicad/code/kicad/issues/4834
2020-07-08 01:45:11 +01:00
Ian McInerney c6eb072726 eeschema: Fix cutoff text in pinmap
Ensure the proper bounding box is used when computing the amount
of space taken by angled text in the control.

Fixes https://gitlab.com/kicad/code/kicad/issues/4761
2020-07-07 23:12:17 +01:00
Ian McInerney f481be3358 Set a proper default for the schematic junction size
Fixes https://gitlab.com/kicad/code/kicad/issues/4834
2020-07-07 23:12:17 +01:00
Ian McInerney ccc0ceb32f Remove deleted item global variables
Fixes https://gitlab.com/kicad/code/kicad/issues/4819
2020-07-07 23:12:17 +01:00
Seth Hillbrand 7cea4b23f1 ADDED: Expand selection in context menu
Break out the context menu with heuristically limited choices being
appended to the main list rather than re-selecting

Fixes https://gitlab.com/kicad/code/kicad/issues/4799
2020-07-07 14:18:35 -07:00
Jon Evans 84b02e51f1 Fix overly aggressive ERC check
It helps to only check for the pintypes I care about
2020-07-07 17:08:07 -04:00
Jeff Young 358cccfd73 A bit of safety if realtime connection updating isn't on. 2020-07-07 14:45:14 +01:00
Jeff Young e66523586b Add Assign Netclass... to context menu.
ADDED Assign Netclass feature to EEschema.

Netclass assignments also now shown in status bar.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
Jon Evans d8be5f9ecf Don't allow pins with NC electrical type to join other nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1826
2020-07-06 20:27:38 -04:00
Jon Evans 23ce2d2e36 Re-add missing include 2020-07-06 19:47:07 -04:00
Seth Hillbrand 66f38dfc10 Remove assert that fires in normal operation
The missing symbol happens normally when the user does not have their
cache file available.  This should not be an assert
2020-07-06 14:37:03 -07:00
Jon Evans 0410fdd9fb Push a few missed project settings out of the frame
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4823
2020-07-06 17:30:27 -04:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jeff Young b917e9aa72 Implement import from... for pin conflicts map. 2020-07-06 20:00:50 +01:00
Jeff Young b0ca7d5140 Netclass setup for Eeschema.
ADDED netclass panel in Schematic Setup dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/2132
2020-07-06 20:00:50 +01:00
Tomasz Wlostowski c1d5394e46 properties: post-rebase fixes 2020-07-05 22:44:38 +02:00
Jeff Young 509cd8f495 Remove duplicate fix not found by merge. 2020-07-05 21:01:19 +01:00
Jeff Young ec6c1b80b7 Fix a couple of bugs in the CurrentSheet architecture. 2020-07-05 19:53:04 +01:00
Jon Evans e9b99cc8b7 Fix grabbing connections from power components 2020-07-04 20:59:35 -04:00
Jon Evans 04a51a5ba4 Push current sheet handling to SCHEMATIC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4803
2020-07-04 20:59:35 -04:00
jean-pierre charras 9e669db5b4 Eeschema: fix a name collision with a Windows header.
the member ERROR of the class PIN_ERROR was colliding: changed to PP_ERROR
2020-07-04 17:51:00 +02:00
Jon Evans d143e14694 Fix memory leaks in color theme editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4794
2020-07-03 22:34:41 -04:00
Jon Evans f725248fd8 Fix ERC pin checking logic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4577
2020-07-03 17:51:20 -04:00
Jon Evans b94e29e3b1 Persist ERC pin table in project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2066

Also a partial fix for https://gitlab.com/kicad/code/kicad/-/issues/4577
2020-07-03 17:11:42 -04:00
jean-pierre charras cf38d382c7 Eeschema: ensure the netlist data is up to date before generating the netlist
Fixes #4779
https://gitlab.com/kicad/code/kicad/issues/4779
2020-07-03 21:08:38 +02:00
Jon Evans 0201cb4e7e Fix schematic reload in standalone mode 2020-07-03 10:43:23 -04:00
Jon Evans 05771f74f7 Fix netlist QA test 2020-07-03 08:21:19 -04:00
Jon Evans 1c72042fc4 Clean up stale nested settings when changing project pointer 2020-07-02 23:55:46 -04:00
Jon Evans 498fa8d8ba Fix some things about template fieldname synchronization 2020-07-02 23:42:36 -04:00
Jon Evans 4dbbe1cf68 Project settings fixes from review
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
2020-07-02 22:08:54 -04:00
Jon Evans fe5959b625 Remove the schematic and board backup file system
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users.  The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
2020-07-02 22:08:54 -04:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans 0e2f9cb1bd Migrate CvPcb project parameters 2020-07-02 22:08:54 -04:00
Jon Evans a4fadfcdf2 Begin moving project file load to new system 2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Ian McInerney f7156a9d49 eeschema: Only warn user about off-grid pins if the position has changed
Fixes https://gitlab.com/kicad/code/kicad/issues/4673
2020-07-03 02:11:47 +01:00
Jeff Young e91acfb67b Correct SHEETNAME validation exclusions which were for SHEETFILENAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/4748
2020-07-02 21:38:37 +01:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +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
Ian McInerney bb1afb747a Remove bus entry shape
The shape isn't needed anymore, since bus entries can be rotated
and mirrored like other items.

Fixes https://gitlab.com/kicad/code/kicad/issues/4588
2020-06-30 02:09:33 +01:00
Jon Evans 8a0277eb2e Fix null graph in some connections
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4747
2020-06-29 20:27:08 -04:00
Seth Hillbrand 67bd49b4a8 Fix order-of-ops issue in sim plot 2020-06-27 19:59:49 -07: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 6acd35c981 Cleanup. 2020-06-27 20:07:26 +01:00
jean-pierre charras 0f0627a53e Eeschema: add 4 new zoom levels (0.1, 0.15, 0.2, 0.3) in context menu.
However, to see them in context menu, the old eeschema.json
config file must be deleted, because it contains the list of allowed zooms.
2020-06-27 20:35:54 +02: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
Ian McInerney fb10406e67 Add right-click context menus for toolbar items 2020-06-26 21:29:03 +00:00
Ian McInerney 52856a8ce4 Move scaled toolbar separator into ACTION_TOOLBAR
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00: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
Wayne Stambaugh b15ee1086f Eeschema: factor out line stroke property object.
The line stroke property object STROKE_PARAMS was factored out an used in
the schematic line object.  This will allow it to be used in other objects
that require line stroke properties so every object does not need to have
it's own definition for line stroke properties.
2020-06-24 13:36:17 -04:00
Tormod Volden e82e30d215 bom2grouped_csv.xsl: Fix sorting of grouped references
Commit a96ebe8f seems to have missed a dollar sign.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/940
hopefully for good this time.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2020-06-23 15:48:59 +02:00
Jon Evans 158f6ad526 Fix net highlighting 2020-06-22 12:02:58 -04:00
Jon Evans 40e0a4295d Re-add netlisting logic inadvertently removed during refactor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4692
2020-06-21 21:43:24 -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 09cb75b8a1 Use a temporary file when saving boards/schematics to make the operation more atomic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4517
2020-06-19 23:31:26 +00: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 ee9d8fcd15 Collapse Pcbnew & ModEdit display and edit settings.
(Prep work for reusing them with a custom shape editor.)
2020-06-18 15:38:01 +01:00
Jon Evans 15b95f2980 Fix project references in eagle importer after SCHEMATIC object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4672
2020-06-17 17:30:24 -04:00
Jeff Young a7703d1207 Cleanup Graphics to parallel Cleanup Tracks & Vias.
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
Seth Hillbrand 4480759599 Remove unused variable 2020-06-15 12:40:02 -07: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 e16426987a Fix wxWidgets alert on integer overflow. 2020-06-13 22:44:16 +01: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
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
jean-pierre charras eef81e84b2 Avoid marking a default name translatable: after translation the result
can be unexpected and broken.
2020-06-06 20:51:50 +02:00
Ian McInerney 4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Wayne Stambaugh c27ca90c13 Symbol library editor: fix broken "Save As..." feature.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4590
2020-06-04 13:25:53 -04: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
Jon Evans ae852e17f9 Re-add null component checking in UpdateNetHighlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4606
2020-06-03 20:36:30 -04:00
Wayne Stambaugh 3fa2bad3c5 Symbol editor: disable tools and menu entries for derived symbols. 2020-06-03 16:57:08 -04:00
Wayne Stambaugh 616ac50cfb KiCad: add support for missing file format extensions.
Don't rename symbol libraries when performing a project "Save As.."
except for the legacy cache library.  Changing library file names
breaks the symbol library table.  This was the less painful  option
than updating the symbol library table.

Fixes https://gitlab.com/kicad/code/kicad/issues/4605
2020-06-03 16:13:42 -04: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
Jeff Young 10add93d16 Fix clang compile warnings. 2020-06-02 20:27:22 +01:00
Jeff Young aadc926740 Coverity fixes and "auto" removal. 2020-06-02 17:22:23 +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
Wayne Stambaugh dd1a7627f8 Move setting derived symbol field properties from parent symbol.
In order allow the new file format to support derived symbols with
field properties that are different than the parent symbol, the code
that copied the parent field properties to the derive symbol field
properties had to moved out of LIB_PART::SetParent() into the legacy
symbol library plugin and the symbol library editor add new symbol
code to preserve the current behavior and not overwrite derived
symbol field properties.

This lays the ground work for allowing field properties of derived
symbols to be different than their parent symbol.
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
Michael Kavanagh 9414f65a3f Eeschema: allow Properties... in wire context menu
Seems to have been forgotten from 91fd0635
2020-05-30 14:29:53 +00:00
jean-pierre charras 598ed8b394 toolbars_lib_view.cpp and toolbars_libedit.cpp: do not recreate comboboxes
when clearing toolbars.
Clearing toolbars delete only tools, not other widgets.
recreating comboboxes creates strange cosmetic issues.

Fixes #4542
https://gitlab.com/kicad/code/kicad/issues/4542
2020-05-30 14:14:24 +02:00
Jeff Young e7603ddcb9 Add tilde escape syntax to syntax help. 2020-05-29 22:06:48 +01:00
Jon Evans b0ebc476d2 Don't assert when getting line width for sheets 2020-05-29 16:38:25 -04: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 91fd063585 Eeschema: allow editing of wire and bus properties.
CHANGED: Wire and bus lines properties (color, line width, and line type)
can be edited the same as graphical lines.
2020-05-29 14:33:27 +00:00
Wayne Stambaugh c2d94358fc Symbol editor: minor fixes to disable saving the legacy file format.
Fixes https://gitlab.com/kicad/code/kicad/issues/4093
2020-05-29 12:43:00 +00:00
Wayne Stambaugh 6c8b937e1b Symbol editor: disable saving legacy symbol libraries.
CHANGED: The symbol library save menu entry is now only enable when the
currently selected library is modified.

CHANGED: The symbol library save all menu entry and tool bar button are
enabled when one or more of the symbol libraries have been modified.

REMOVED: The ability to save symbol libraries in the legacy file format.
2020-05-29 12:43:00 +00: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
Wayne Stambaugh b83d64fc0d Eeschema: remove superfluous updating of SCH_COMPONENT pins.
Every time SCH_COMPONENT::GetDrawItem() was called, the schematic symbol
pin table was updated.  Under certain conditions, this happens inside
loops so the amount of time spent rebuilding the pin table can add up.
2020-05-28 18:32:28 -04: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 8d92a95cb8 Fix a couple of issues with text var autocomplete.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-28 20:00:21 +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
Jeff Young f3e4e61fa7 Push some more editing code out to the tool framework. 2020-05-27 23:29:51 +01:00
Jeff Young fb8dcb52d1 Don't gray out mandatory field names.
(Even though they are read-only.  It makes it look like the whole
field is disabled.)
2020-05-27 23:29:51 +01:00
Jon Evans 1792479ca5 Fix sheet pin import after SelectPoint API change
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4552
2020-05-27 11:21:59 -04:00
Jeff Young 6ef6284924 Make sure markers get removed from view when deleted. 2020-05-26 22:09:31 +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
Wayne Stambaugh 06fde791f0 New schematic and symbol library file format layout changes.
Force default settings to be written instead of undefined which mimics
the behavior of the previous file format with the exception of text
objects which requires some more thought.  Please note that no new
features are added to the library file format so the file version did
not need to be updated.

Fixes https://gitlab.com/kicad/code/kicad/issues/4411
2020-05-26 12:58:57 +00: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 13baf548ca Ensure merged buses have all members 2020-05-25 17:35:26 -04:00
Jon Evans df16ea25a8 Properly send cross-probe for nested buses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4541
2020-05-25 17:03:49 -04:00
Mikołaj Wielgus ecec7192fc Add "Select All" in schematic & layout disambiguation popup menu
ADDED: "Select All" in schematic editor disambiguation menu
ADDED: "Select All" in layout edtor disambiguation menu

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3877
2020-05-24 23:35:04 +00:00
Jon Evans 77a6550ba9 Fix bus unfolding with prefixes 2020-05-24 19:17:01 -04:00
Jon Evans 82a2530863 Fix missing inits of graph in a few places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4532
2020-05-24 19:17:01 -04:00
Jon Evans 699985cd97 Check for nested buses when highlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4531
2020-05-24 16:15:22 -04:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -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 48ab1d1a93 Set sheet pins to bus color if they are a bus in the child sheet
As a visual aid, we can peek into the child to see if a pin
represents a bus in the child (in the case of aliases etc
we might not be able to tell by the name of the pin).

Only do this if there isn't anything else driving a connection
onto the sheet pin in the parent sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2619
2020-05-23 23:57:10 -04:00
Jon Evans e934f8b459 Remove python netlist QA facilities 2020-05-23 22:48:09 -04:00
Jon Evans f7578eb038 Implement new native netlist QA test 2020-05-23 21:04:11 -04:00
Jon Evans 1c2ef8678c Use proper refdes sorting for component ordering in netlists 2020-05-23 20:31:41 -04:00
Jon Evans cc47082566 Reset connection graph when loading new root sheet 2020-05-23 20:31:41 -04:00
Michael Kavanagh 1a946a7094 Eeschema:Remove import fp assignments from toolbar
Fixes https://gitlab.com/kicad/code/kicad/issues/4368
2020-05-23 23:09:37 +00:00
Jon Evans a63df2fbf0 Remove BuildNetListBase from netlisting paths 2020-05-23 13:14:05 -04:00
Jon Evans ca41dc2e66 Clean up extra TODO 2020-05-23 12:53:05 -04:00
Jon Evans de9520d65e Finish porting netlisters to use CONNECTION_GRAPH 2020-05-23 12:45:24 -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
jean-pierre charras 14f5ef4078 Eeschema: ensure component edit flags are cleared after loading a schematic file.
Fixes #4515
https://gitlab.com/kicad/code/kicad/issues/4515
2020-05-22 20:25:43 +02:00
jean-pierre charras 4cfff6b35d Libedit: fix crash when right clicking.
Fixes #4511
https://gitlab.com/kicad/code/kicad/issues/4511
2020-05-22 09:01:29 +02:00
Ian McInerney fca7ade81f Move to the AUI version of the infobar
The sizer-based version had issues with the event processing
inside the GAL panel on Windows systems.

Fixes https://gitlab.com/kicad/code/kicad/issues/4501
2020-05-21 18:22:56 +01:00
Wayne Stambaugh a02f4cc7e4 Eeschema: fix project rescue bug.
Apparently at some point in our development history, we allowed aliases
to be saved in the cache library.  The rescue code was only looking for
root symbols in the cache library which caused missing symbol rescues.
Flattening the symbols ensures the rescue library will have a unique
symbol for every symbol in the schematic.  This bug also was in play
when rescuing from the symbol library table.

Fixes https://gitlab.com/kicad/code/kicad/issues/4494
2020-05-21 08:02:45 -04:00
Jon Evans 2499a1d640 Remove KIWAY dependence from SCH_PLUGINs 2020-05-20 23:00:23 -04:00
Jon Evans 7c7b7f41da Move SCH_SCREEN project access to SCHEMATIC
SCH_SCREEN no longer needs to be a KIWAY_HOLDER
2020-05-20 22:27:48 -04:00
Jon Evans b6d7bc36d0 Ensure component bounding boxes are correct
This was causing junctions to not always be added on wire
segments that overlapped component pins, because the pin
might not be part of the component bounding box before
UpdateLocalLibSymbolLinks() is called.  When the bbox
was never updated, these symbols weren't collected by
the rtree query for objects overlapping a point.
2020-05-20 18:50:09 -04:00
Wayne Stambaugh 480588866c Eeschema: toggle locale when pasting to prevent parsing errors. 2020-05-20 08:08:38 -04:00
Ian McInerney c4142a5842 Remaining part of code forgotten by 73a1ce3e 2020-05-20 11:43:50 +01:00
Jon Evans 5248f2952e Use schematic default line width for GetPenWidth on zero-size lines 2020-05-20 00:03:27 -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 b074cdf185 Ensure that eeschema loads project params in standalone mode 2020-05-19 23:57:53 -04:00
Jon Evans e1476dea58 Fix build 2020-05-19 23:57:53 -04:00
Ian McInerney 73a1ce3e84 Move eeschema find notification to the infobar and improve the infobar widget
* Move it to a panel along with the canvas to have a better UI
* Allow the infobar to automatically close after a set time

CHANGED: The eeschema find notifications now use the infobar instead of
a popup window
2020-05-20 02:31:47 +01:00
Ian McInerney 2bc57ade28 Cleanup parentage inside the draw panels 2020-05-20 02:23:46 +01:00
Jeff Young 7bb280ea39 General cleanup. 2020-05-19 20:48:47 +01:00
Jon Evans 4e2e280bf4 Fix part adding 2020-05-19 13:24:57 -04:00
Wayne Stambaugh 28b8e75211 Fix duplicate time stamp bug when loading legacy schematics. 2020-05-19 11:01:00 -04:00
Jon Evans 14773d073d Fix initialization of schematic in legacy plugin 2020-05-19 09:08:49 -04:00
Jon Evans f4d7c323f5 Coverity fixes 2020-05-18 22:58:28 -04:00
Ian McInerney a2f027e063 Add an infobar widget to display information above the canvas
This widget allows for non-intrusive display of text
above the editing canvas. Currently, this is used
for displaying the read only status of the files.
2020-05-19 00:46:33 +01:00
Jon Evans 5a9e69b146 Use the eeschema color theme for the symbol preview canvas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4484
2020-05-18 17:53:46 -04:00
Wayne Stambaugh ad6857f131 Eeschema: fix copy and paste issue when non-C locales are involved.
Fixes https://gitlab.com/kicad/code/kicad/issues/4449
2020-05-18 15:47:36 -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
Ian McInerney e662e33104 Store the current filename in the history on close 2020-05-17 00:12:49 +01:00
Ian McInerney 613c020920 Move the file history into the frames 2020-05-17 00:12:49 +01: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
Wayne Stambaugh 980aefea4b Eeschema: fix copy and paste bug.
Add required library symbols to new file formatter and parser when copying
schematic symbols to prevent missing library symbol when pasting into a
different schematic which may not have the same library symbol available.

Fix a minor bug where the default schematic symbol reference was not set
by the parser when loading.

Fixes https://gitlab.com/kicad/code/kicad/issues/4442
2020-05-15 15:53:59 -04:00
Jeff Young 84160c1da4 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/4448
2020-05-15 00:27:19 +01:00
Wayne Stambaugh ad88874adf Use new file formats for copy and paste in schematic and symbol editors. 2020-05-13 18:56:19 -04:00
Jeff Young 4a1ee40058 Pretty print bus definitions to the menus. 2020-05-13 16:26:53 +01:00
Jeff Young 050191460f Check for empty bus vectors and allow backwards vector specs.
Fixes https://gitlab.com/kicad/code/kicad/issues/4421
2020-05-13 13:42:23 +01:00
Jeff Young ba301c292a Check for single item seletion for most property dialogs. 2020-05-13 13:42:23 +01:00
jean-pierre charras 2cf82d9129 fix a wxWidgets minor alert and compil warnings 2020-05-13 08:53:32 +02:00
Jeff Young ed57c3464d Fix sch parser issue with older file versions.
Fixes https://gitlab.com/kicad/code/kicad/issues/4417
2020-05-12 20:05:23 +01:00
Jeff Young ec5f7b35a9 Attempt to fix crash with RMB on un-selected graphic line.
Fixes https://gitlab.com/kicad/code/kicad/issues/4414
2020-05-12 19:48:59 +01:00
Jeff Young 724c669434 Move a few more commands to tool framework. 2020-05-12 18:12:38 +01:00
Jeff Young 301ac3461c Fix some more pen width issues from global removal.
Fixes https://gitlab.com/kicad/code/kicad/issues/4408
2020-05-12 15:20:17 +01:00
Jeff Young 06dea92bcb Fix issues with Kicad Manager frame and new kicad_sch files.
Fixes https://gitlab.com/kicad/code/kicad/issues/4410
2020-05-12 15:20:17 +01:00
Jeff Young c66bf3df67 Move tool shutdown to after all cancel opportunities.
Fixes https://gitlab.com/kicad/code/kicad/issues/4401
2020-05-12 00:07:19 +01:00
Jeff Young 105f85e551 Fix new bus parsers to correctly handle non-buses.
Fixes https://gitlab.com/kicad/code/kicad/issues/4403
2020-05-11 22:56:09 +01:00
Frank Severinsen 9ca61b50b6 Check reference designator type when comparing comp
example: prevents a 10K NTC resistor from getting grouped with a 10K SMD resistor
2020-05-10 23:54:28 +00:00
Jon Evans 0d654b3574 Use dynamic_cast for safety in eeconfig()
Calling config() gets you whatever APP_SETTINGS_BASE is returned
by the underlying kiface, which is currently going to be an
EESCHEMA_SETTINGS everywhere this is used, but that isn't a
guarantee.
2020-05-10 18:43:01 -04:00
Jon Evans 108cf23892 Restore separate libedit settings for common settings params
Be careful when calling config() in eeschema/libedit/pcbnew/modedit
It's usually not the thing you want.

A better fix for #4389
2020-05-10 18:02:58 -04:00
Jeff Young 1cfcfc3ca7 Fix some formatting issues in syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
2020-05-10 22:34:40 +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
Jon Evans df5b093fda Fix missing GetWindowSettings for LIB_EDIT_FRAME
Fixes #4389
2020-05-10 14:28:41 -04: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
jean-pierre charras bc24d8e957 Fix typo and I18N string 2020-05-10 16:55:15 +02:00
Wayne Stambaugh 8c2aee1261 Eeschema: fix new schematic file format image parser buffer size.
Fixes https://gitlab.com/kicad/code/kicad/issues/4387
2020-05-10 08:47:42 -04:00
Simon Richter 632494cba7 Add missing includes
A few more instances of missing <algorithm> for std::max
2020-05-10 00:24:11 +02:00
Wayne Stambaugh a81286d9ea Fix infinite loop bug in new schematic file format image parser.
Fixes https://gitlab.com/kicad/code/kicad/issues/4362
2020-05-09 14:20:27 -04:00
jean-pierre charras ee08baca03 Eeschema: fix issue when saving a S expr symbol library in countries using comma as fp separator
Fixes #4381
https://gitlab.com/kicad/code/kicad/issues/4381
2020-05-09 19:39:08 +02:00
jean-pierre charras b29f55c1ca Cosmetic minor changes for 2 icons.
Avoid using the same icon for 2 different actions in the same screen or menu.
2020-05-09 16:22:29 +02:00
Jeff Young 04057423a9 A bit of cleanup. 2020-05-09 14:14:38 +01:00
Jeff Young d645c22411 Allow path separators in the sheet filename validator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4374
2020-05-09 00:04:29 +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 ae102c7411 Remove bogus assert. Also fix const leak.
Fixes https://gitlab.com/kicad/code/kicad/issues/4367
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 35f3eb6220 Eeschema: fix large diffs when saving schematics.
Apparently the < operator was never implemented for SCH_JUNCTION objects
so they were not get sorted which was causing the large diffs between
schematic saves.

Fixes https://gitlab.com/kicad/code/kicad/issues/4369
2020-05-08 16:01:14 -04:00
Wayne Stambaugh 1840fe351e Eeschema: fix assertion when duplicating a sheet.
The duplicate sheet code path assigned a SCH_SCREEN object instead of a
SCH_SHEET object as a parent.  A recently added assertion to check for
this did it's job.

Fixes https://gitlab.com/kicad/code/kicad/issues/4369
2020-05-08 14:57:44 -04:00
Wayne Stambaugh 62d72ae081 Eeschema: fix new symbol library file format parser bug.
LIB_FIELD objects require a LIB_PART as a parent.  Add missing parent on
symbol library load.

Fixes https://gitlab.com/kicad/code/kicad/issues/4360
2020-05-08 13:34:21 -04:00
Jon Evans 302646cb3c Check for null parent in GetFullText
Fixes #4360
2020-05-07 20:31:06 -04:00
Wayne Stambaugh bc0fc0bb3a Eeschema: fix broken net list items in schematic symbol object.
Fixes https://gitlab.com/kicad/code/kicad/issues/4358
2020-05-07 16:28:59 -04: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 73e1496b25 Change attached-label algorithm.
Rather than try and keep moving with other items, calculate nearest
point on current line to original label at each step.

Fixes https://gitlab.com/kicad/code/kicad/issues/4347
2020-05-07 18:59:47 +01:00
Jeff Young f0cda374a0 A few more visual adjustments to the new note text. 2020-05-07 17:51:27 +01:00
Jeff Young 8efa8af8cc Add persistence of DRC error severities. 2020-05-07 17:51:27 +01:00
Wayne Stambaugh 3fbc2f9035 Symbol editor: adding a new library should not create legacy format.
Fixes https://gitlab.com/kicad/code/kicad/issues/4346
2020-05-07 11:25:48 -04: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
Wayne Stambaugh e253862f77 Eeschema: remove automatic conversion of time stamp UUIDs.
In order to avoid confusion when loading legacy schematics, updating time
stamp UUIDs is no longer performed.  If users where not experiencing issues
with time stamp clashes with shared schematics then this was probably a
case of me being overly cautious.

The original conversion code has be moved to
SCH_EDIT_FRAME::ConvertTimeStampUuids() so the working functionality is
not lost.  This function should not be used until a way is found to update
the board from the schematics with the appropriate settings.
2020-05-07 09:26:43 -04:00
Jon Evans c92181621e Use strong check for bus label when netlisting
Fixes #4318
2020-05-06 18:27:03 -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
Ian McInerney 1443d69f00 Move the import non-kicad schematic item to the import submenu
This matches its location in Pcbnew.
2020-05-06 22:37:40 +01:00
Jeff Young d56dced0ab Fix dialog grow behaviour. 2020-05-06 20:38:12 +01:00
Jeff Young 51e72ed9ba Finish the collect-attached-labels rewrite.
Fixes https://gitlab.com/kicad/code/kicad/issues/4341
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 f6d1aa1f42 Fix some failures to drop hover selections after executing a command.
Fixes https://gitlab.com/kicad/code/kicad/issues/4330
2020-05-06 19:02:21 +01: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 d0217e38cd Some clean-up from last merge. 2020-05-06 19:02:21 +01:00
Jeff Young 1f9723cf62 Reconcile new Sheet Fields and new S-expr file format.
Fixes https://gitlab.com/kicad/code/kicad/issues/4327
2020-05-06 15:48:58 +01:00
Jeff Young 0f34fc2e5f Simplify the "pick up attached labels" logic.
This should vastly reduce the number of side-effects we were seeing.

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4320
2020-05-06 15:48:58 +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
Wayne Stambaugh 91494fc561 Eeschema: add missing bus alias support to new schematic file format.
Fixes https://gitlab.com/kicad/code/kicad/issues/4335
2020-05-06 09:27:01 -04:00
Jon Evans 7911bc431a Fix segfault when starting LIB_VIEW_FRAME 2020-05-05 21:46:00 -04:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Ian McInerney 2148c593d6 Fix some compile warnings 2020-05-06 01:46:09 +01:00
Wayne Stambaugh aa9e74493f Eeschema: fix netlist creation crash when opening spice simulator. 2020-05-05 18:35:27 -04:00
Wayne Stambaugh 590a101a88 Eeschema: fix update schematic symbol library link bugs. 2020-05-05 18:06:43 -04:00
Wayne Stambaugh 00716e362a Eeschema: simplify updating symbol alternate body style.
Move updating the pin maps from external code to the SCH_COMPONENT object
when changing the symbol body style (DeMorgan).  This is a vein attempt
to make the SCH_COMPONENT object self contained so we don't have to depend
on the caller needing to figure out how to keep internal objects synced.
2020-05-05 16:42:59 -04:00
Wayne Stambaugh 9c99286385 Fix a few Coverity warnings. 2020-05-05 16:42:59 -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 df37887b1f Factor line width into global label shape.
Fixes https://gitlab.com/kicad/code/kicad/issues/4323
2020-05-05 20:26:51 +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 0ef97ac486 Eeschema: add missing alternate body style to new schematic file format.
Fixes https://gitlab.com/kicad/code/kicad/issues/4321
2020-05-05 09:15:13 -04:00
Wayne Stambaugh c18a7b42ee Eeschema: fix crash when updating board from schematic.
Removed some rogue calls to SCH_SCREEN::UpdateSymbolLinks() which should
only be called the last time the schematic is loaded from the legacy file
format.  After that, all symbol library links should be changed using
SCH_COMPONENT::SetLibSymbol() which will prevent the pin maps from ending
up with broken symbol library pin links.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4318
2020-05-04 19:34:24 -04:00
Wayne Stambaugh a8407fba4c Fix schematic field index bug in s-expression file format plugin. 2020-05-04 12:40:03 +00: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
Jeff Young 5bed201a23 Don't collect connected labels on a paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/4311
2020-05-03 21:47:53 +01:00
Jeff Young 0370eff7ba Add sheet number processing to sheet fields.
Also fixes a bug where we were depending on the old deque stuff's
deterministic traversal, which isn't provided by the new RTree stuff.

Fixes https://gitlab.com/kicad/code/kicad/issues/2433
2020-05-03 20:56:32 +01:00
jean-pierre charras 05afbcc22e library viewers: fix a focus issue that prevent using arrow keys in lib or fp lists.
Once the gal canvas hsad the focus, it was not possible to use arrow keys in library
or symbols or fp lists even after clicking on an item.

This focus issue is now fixed.

Fixes #4292
https://gitlab.com/kicad/code/kicad/issues/4292
2020-05-03 20:11:33 +02:00
jean-pierre charras 7554a2df30 Eeschema, library viewer: fix some render options, especially default line thickness 2020-05-03 15:38:28 +02: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
Jeff Young 199bb2ffb0 Add hittesting for worksheets in Pcbnew and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/4282
2020-05-03 00:07:38 +01: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
Jeff Young 874f13e29e Fix some issues with rotated oval pads. 2020-05-01 18:49:42 +01:00
Jeff Young a56191b658 Add distances to a bunch of DRC violation reports. 2020-05-01 18:49:42 +01:00
Jon Evans 4b4952b09a Add short-circuits for regex testing 2020-04-30 19:53:25 +00:00
Jon Evans cf15a1c493 Cache SCH_SHEET_PATH recursion test results 2020-04-30 19:53:25 +00:00
Jon Evans f4f43f51c8 Cache connection names 2020-04-30 19:53:25 +00:00
Jon Evans 1204b9cbef Use cached pins in SCH_COMPONENT::GetEndPoints() 2020-04-30 19:53:25 +00:00
Jon Evans 2eaefb4874 Improve performance of schematic load and connectivity
Store component paths and references efficiently
Remove redundant calls to RecalculateConnections
2020-04-30 19:53:25 +00: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
jean-pierre charras 687c2f3e82 eeschema: fix a readability issue for small texts.
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
2020-04-30 09:38:23 +02:00
jean-pierre charras d10c8cd75b Sheet pins: fix incorrect size and plot thickness of the graphic symbol.
Unlike the global labels, the hierarchical label is not inside the graphic symbol.
So the graphic symbol size depends only of the text size, not of the text offset.
2020-04-29 17:46:36 +02:00
jean-pierre charras 62d78cdf49 erc_item.cpp: fix issue that created broken error list in panel setup severities
Fix a minor Coverity warning.
2020-04-29 15:30:31 +02:00
Jeff Young 1daa2224d0 Tidy up the layout of the Colors Editor. 2020-04-27 11:59:57 +01:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Wayne Stambaugh 1a8082c6d6 Eeschema: fix partial schematic load bug in the legacy plugin.
Move the hierarchical sheet loading outside of the try exception block
so that any sheets that were loaded when a schematic file load fails
are loaded rather than skipped.  This allows more of the schematic to
be loaded when any parser errors occur.
2020-04-26 15:47:25 -04:00
Wayne Stambaugh fa57c8a570 Eeschema: fix sheet bug in schematic editor drawing tool.
SCH_SHEET objects can only have another SCH_SHEET object as a parent
or nullptr for the root sheet so overload EDA_ITEM::SetParent() to
prevent the parent from being set to another type of object and add
some checks to the root sheet code just in case someone gets clever
and attempts to bypass the overloaded SetParent() call.
2020-04-26 14:27:51 -04:00
jean-pierre charras 349ec2031b Eeschema plot worksheet: use the color defined in Eeschema settings.
Fixes #4265
https://gitlab.com/kicad/code/kicad/issues/4265
2020-04-26 09:06:02 +02:00
jean-pierre charras 4f369801f2 Fix a few compil and Coverity warnings. 2020-04-25 08:49:16 +02:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young 49c46dc796 Fix typo. 2020-04-24 23:22:11 +01:00
Jeff Young 2fb2eac4d5 Performance enhancements. 2020-04-24 22:17:45 +01:00
Jeff Young 32db9eb0f1 Add some distances to a few DRC errors. 2020-04-24 22:17:45 +01:00
Jeff Young e14e3faed6 Use resolved text for connections. 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
Jeff Young cb89e18281 Get rid of the visible axes in Eeschema. 2020-04-24 14:46:22 +01:00
Jeff Young 7308099852 Add an icon and put Schematic Setup in the toolbar. 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
Ian McInerney facf40d3ce libedit: Add drag to move behavior
ADDED: Drag to move behavior in the symbol editor

Fixes https://gitlab.com/kicad/code/kicad/issues/1904
2020-04-23 23:58:33 +01:00
Jon Evans f7ebf2af5e Add separate color setting for bus junctions
Fix plotting and printing to use bus color when
connectivity detects that the junction is on a bus.

Fixes #4098
2020-04-22 21:55:48 -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 da7205ff32 Re-implement negative-width-means-don't-stroke hack. 2020-04-21 21:17:59 +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 f113370e1e Edit worksheet properties when no other selection is available.
Fixes https://gitlab.com/kicad/code/kicad/issues/4044
2020-04-21 21:17:59 +01:00
jean-pierre charras 83cb9c0d14 Fix a few Coverity and compil minor warnings. Remove dead code 2020-04-21 12:47:48 +02:00
Jon Evans d7d1ea33ac Check for conflicts before promoting sheet pins to be strong drivers
Fixes https://gitlab.com/kicad/code/kicad/issues/4201
2020-04-19 19:13:24 -04:00
Jon Evans b802a3e776 Add command-line option to generate netlist and exit 2020-04-19 19:13:24 -04: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 a286cb5a8f Keep labels on dragged wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/2107
2020-04-19 18:24:39 +01:00
Jeff Young 71fd560735 Add "Export to other sheets" to paper settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/2177
2020-04-19 18:24:39 +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
Jeff Young d7d1cb6f78 A bunch of fixes to Eeschema Find/Replace. 2020-04-18 14:43:08 +01:00
jean-pierre charras 98b9c80eb4 Schematic editor: fix not working tool to show/hide invisible pins.
Fixes #4222
https://gitlab.com/kicad/code/kicad/issues/4222
2020-04-18 09:57:04 +02:00
Ian McInerney 3b67e3d0a4 Rewrite window positioning logic
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.

CHANGED: Window position on startup should be preserved more
2020-04-18 00:47:38 +01:00
Jeff Young 7526d2affb Fix possible null-dereference. 2020-04-17 21:13:56 +01:00
Jeff Young 0dfdc37ae7 Clean up label spacing to be more predictable.
Don't try to use complex algorithms taking into account default
margins, line-widths and pen-widths (especially when they differed
between label types).  We now use the (user-controlled) text
offset ratio to determine the margins (from the center-point of
the attached line).
2020-04-17 14:47:57 +01:00
Jeff Young 66059d6d55 Remove scrollbars from multi-line text ctrl.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-16 20:36:12 +01:00
Jeff Young 96db1c7b1e Add pin reference to PINLABEL for use when generating ERC marker.
Fixes https://gitlab.com/kicad/code/kicad/issues/4208
2020-04-16 19:53:03 +01:00
Jeff Young 37023da56f Tidy some compiler warnings. 2020-04-16 17:34:46 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 25d7c0cae2 Opencascade: fix min version: OCE=0.18, OCC=6.9.0
Fix also a few minor Coverity warnings.
2020-04-16 10:22:20 +02:00
Sylwester Kocjan fdccdd5cb9 Eeschema: adding .op SPICE simulation support
ADDED new tab on simulation settings dialog, which allows to run .op analysis.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2368
2020-04-15 01:51:58 +00:00
jean-pierre charras 952e7a5fb4 Eeschema: move some default values to default_values.h.
These default values are used in many files, and some files were using
magic numbers.
2020-04-14 20:15:18 +02:00
jean-pierre charras 4a2a5a9403 qa_eeschema: fix a crash due to LIB_PIN ctor that was using default config values,
but in QA tests, we do not have config values available.
2020-04-14 18:12:15 +02:00
jean-pierre charras a49deec278 Eeschema: fix crash when plotting in HPGL format. 2020-04-14 13:50:09 +02:00
jean-pierre charras 6148461484 Eeschema plot: fix (temporary) line 0 thickness.
Plotting lines having 0 thickness is not acceptable and create issues.
2020-04-14 12:43:51 +02:00
jean-pierre charras 04ea20dd44 Eeschema, SCH_PAINTER: fix max text thickness issue, to have small texts readable. 2020-04-14 11:08:42 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young d014dc47ab Finish moving text markup flags to project-level settings. 2020-04-13 20:58:13 +01:00
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +01:00
jean-pierre charras 5405c09b81 Eeschema: avoid initializing default line thickness to 0: it can create issues.
Some graphic line thickness were initialized to 0.
The actual line thickness is set after reading config.
But in some cases the config does not exist, and 0 line thickness creates draw issues.
2020-04-12 19:50:33 +02:00
jean-pierre charras bcf31ef3d1 DIALOG_SCHEMATIC_SETUP: fix incorrect parent of some sub-page panels.
These panels must have the wxTreeBook as parent to receive mouse and key events.
They previously have the dialog itself, but it does not work on any OS.
2020-04-12 18:17:57 +02:00
Jeff Young c82679a6f2 Fix crash bug when highlighting no net (found by Coverity). 2020-04-12 11:19:44 +01:00
jean-pierre charras bdada70ee7 Cosmetic enhancements: add bitmaps to a few context menus.
Fix also a minor compil warning.
2020-04-12 10:29:28 +02:00
Jeff Young 292a9fadd9 Allow a click in the value field when searching for power nodes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-11 23:51:00 +01:00
Jeff Young 350696ecdd Only convert references to KIIDs if the variable resolves.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young dbded3e5dc Make sure to check for unit designator when converting to KIIDs.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young 505d8bf56e Allow ':'s in field name references in text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young c66fe5e91e Don't try to add unit designator for a component without multiple units.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
jean-pierre charras 48a0f25ce6 EE_COLLECTOR::Collect(): fix an issue when called with filter = SCH_LOCATE_ANY_T.
When the filter = SCH_LOCATE_ANY_T, components and sheets were selected twice, one
from the main loop, and one from specialized loops for SCH_COMPONENT_T and SCH_SHEET_T.
2020-04-11 16:08:10 +02:00
Jeff Young 8854b799e8 Fix a minor spelling error.
Also changes the capitalisation of a string which isn't used, but looks
so wrong in FormBuilder that I couldn't help fixing it.
2020-04-11 13:06:45 +01:00
Jeff Young c4994eee7b Fix a pair of bugs in the new highlight net logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-11 13:02:18 +01:00
jean-pierre charras 096564ec0c Fix some typos and I18n issues 2020-04-11 08:57:46 +02:00
Jeff Young 84944524cc Fix crash on OSX when page was changed before hack array was alloc'ed. 2020-04-10 22:49:56 +01:00
jean-pierre charras dac78d2562 fix a few minor Coverity warnings. 2020-04-10 18:28:12 +02:00
Jeff Young 962aa73e12 Improve EE_COLLECTOR to not miss children of sheets or symbols.
Also implements pin highlighting and special cases for power symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-10 14:09:26 +01:00
Jeff Young b067e441c7 Show/hide sheet colors when flipping override flag. 2020-04-10 00:35:17 +01:00
Jeff Young f4e22a9264 Add ability to override individual item colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/4167
2020-04-09 17:17:27 +01:00
Jeff Young 317e98b344 Simplify user model for editing color themes. 2020-04-08 22:34:56 +01:00
jean-pierre charras 6e593aa1e0 SCH_BASE_FRAME::FocusOnItem() fix incorrect calculation of a pin physical position.
Only ERC dialog was affected: when clicking on a error item, if the item is a pin
the cursor was put far from the right location.
2020-04-08 11:06:41 +02:00
jean-pierre charras cb7263d017 Eeschema: fix ERC dialog not shown after a double click, when recalled by tool ERC.
(the dialog was reactivated by calling Raise(), but this is not enough: Show()
must be called also, at least on Windows).
Fix also a minor wxWidgets alert in ERC dialog.

Fixes #4171
https://gitlab.com/kicad/code/kicad/issues/4171
2020-04-08 10:03:51 +02:00
Jeff Young 6aaee01f1c Generalize fill parsing and add support for sheet background R/W.
Also fixes a bug in colour parsing (the alpha channel is a float).
2020-04-07 17:29:58 +01:00
Jeff Young 8eb15fe911 Tidy up some Coverity issues. 2020-04-07 17:29:58 +01:00
Jeff Young aba0fa7bf8 Allow cross-referencing text substitutions. 2020-04-07 17:29:58 +01:00
Jeff Young 76bbb71402 Correct some formatting issues. 2020-04-07 17:29:58 +01:00
Wayne Stambaugh 95089623a4 Eeschema: fix s-expression build errors due to global variable changes. 2020-04-06 22:47:42 +00:00
Wayne Stambaugh c9b00e3898 Eeschema: minor s-expression file format improvements.
I could not find a reasonable solution to the mandatory field canonical
name issue so field indices are back in play as much as I did not want
to use them.  They really only have meaning for the mandatory fields.
For all other fields, the index number is meaningless and the field name
is the primary means for searching.

Fix a broken field size bug in the symbol library formatter.
2020-04-06 22:47:42 +00:00
Wayne Stambaugh 992d141292 Eeschema: minor s-expression schematic file format improvement.
Save image data using a base64 encoded string to reduce the file size.
2020-04-06 22:47:42 +00:00
Wayne Stambaugh 2f682b6c5f Eeschema: implement s-expression schematic file format parser.
Fix a few issues with the s-expression schematic file formatter.
2020-04-06 22:47:42 +00:00
Jeff Young 322ab60cc5 Fix some Coverity issues. 2020-04-06 12:31:59 +01:00
jean-pierre charras 1027c2fb8d Eeschema: when placing a symbol, and after placing others instances of the symbol
deselect the previously placed items.
Otherwise, the changes (rotation, mirroring...) made during placing the current symbol
are applied to other previously placed items.
This is obviously not what is wanted, and creates crashes in Eeschema.

Fixes #4163
https://gitlab.com/kicad/code/kicad/issues/4163
2020-04-06 13:00:58 +02:00
Jeff Young b13559c926 Add envVar and text variable resolution to plot directory paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/3808
2020-04-05 23:56:24 +01:00
Jeff Young cc9ac37a0e Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
Jeff Young a2102d87c5 Fix typo. 2020-04-05 20:52:26 +01:00
Jeff Young c663965498 Fix some issues with sheet border color handling. 2020-04-05 16:17:04 +01:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +01:00
Wayne Stambaugh 4a6c03e7fe Minor string abbreviation and capitalization fix. 2020-04-05 09:39:08 -04:00
jean-pierre charras c16a453e53 fix minor wxWidgets alerts and a minor Coverity warning 2020-04-05 10:36:55 +02:00
jean-pierre charras 3b39a14fa9 Eeschema, fields_grid_table.cpp: sheet filename selector: use right wildcard syntax. 2020-04-05 09:56:40 +02:00
jean-pierre charras caf4a64877 Eeschema, DIALOG_SCH_SHEET_PROPS: try to fix a very serious issue:
When editing a sheet properties, the dialog always thinks the sheet filename is changed.
It creates serious issues, like duplicating all items in sheet, because the code try to
again import the existing sheet file content.
The temporary fix does not import the existing sheet file content if the
filename is not modified.
This is a very partial fix, because there are many other issues in this dialog
2020-04-04 19:38:53 +02:00
Ian McInerney 0dac0c9a47 Cleanup some dynamic casts
From Coverity scan
2020-04-04 12:41:45 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
Wayne Stambaugh 082944ad06 Minor build warning fixes. 2020-04-03 13:03:23 -04:00
Seth Hillbrand a546851d64 eeschema: Check connections on current unit
This is an expansion of dac12a6d9 that prevents junctions from being
added based on the position of alternate units in a component
2020-04-03 08:40:59 -07:00
jean-pierre charras dac12a6d99 Eeschema: SCH_COMPONENT::Visit(): do not select LIB_PIN* pins not related to the
current selected unit and convert.

Fixes #4152
https://gitlab.com/kicad/code/kicad/issues/4152
2020-04-03 16:34:37 +02:00
jean-pierre charras b1b8a32078 fix a few Coverity warnings and compil minor warnings. 2020-04-03 09:54:47 +02:00
Wayne Stambaugh f6d7ef367d Eeschema: fix symbol cache library look up bug.
Use an underscore character instead of a semicolon between the library
ID library nickname and symbol name in library ID search strings when
looking up symbols in the cache library since that is how they are saved
when creating the cache library.  This fixes rescuing missing symbols
from the cache when they have been removed from the original library and
preventing a broken symbol link indicator from being shown when a symbol
is removed from the library.

Add some defensive testing to make sure the library passed to function
SchGetLibPart() is actually the cache library.
2020-04-02 15:24:28 -04:00
Jeff Young b59da3e4dc Overridden versions of GetShownText() still need to call EDA_TEXT version.
Fixes https://gitlab.com/kicad/code/kicad/issues/4151
2020-04-02 18:27:54 +01:00
Jeff Young 20c00cbb21 Finish off "busses" -> "buses".
Fixes https://gitlab.com/kicad/code/kicad/issues/4144
2020-04-02 18:27:05 +01:00
Jeff Young 9ab2fcda77 One more "busses" fix. 2020-04-02 14:58:35 +01:00
Jeff Young ae02835fef Fix spelling error.
Fixes https://gitlab.com/kicad/code/kicad/issues/4144
2020-04-02 14:34:52 +01:00
Jeff Young a76ddb52a0 Add sheet borders and backgrounds to Edit Text & Graphics.
Also moves sheet border and sheet background colours to preferences
so it's clearer they're just for newly-created items.

Fixes https://gitlab.com/kicad/code/kicad/issues/4144
2020-04-02 14:01:30 +01:00
jean-pierre charras 25fb2595c8 Fix fully broken selection of items of the same sheet, in pcbnew and from eeschema.
Previously, the full UUID path used to select footprints was full broken.
2020-04-02 14:21:09 +02:00
Wayne Stambaugh e91f1f57dd Eeschema: fix rescue multiple unit symbol bug.
The code that checked for pin conflicts to determine if a symbol needed
rescued did not check either the pin convert setting so it was possible
for a pin from the other convert on symbols that do not have identical
units to appear to not have a pin conflict.  Add tests for pin unit and
convert setting to prevent that from breaking the comparison.  This must
have always been broken.

Fix the symbol preview widget to prevent drawing all symbols on top of
each other (if we need to do this the code will have to be revised) and
also show the convert if valid.

Fix broken symbol cache library when saving alias symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/3879
2020-04-01 20:19:53 -04:00
jean-pierre charras 6730313ab7 eeschema: minor fixes in DIALOG_SCH_SHEET_PROPS:
- test for empty fileName
- ensure the new filename has the right extension.
2020-04-01 18:30:48 +02:00
Jeff Young 9a67dc56f9 Clean up assumption that field_id < MANDATORY means its mandatory.
It looks good, but non-mandatory fields have an ID of -1, so it
doesn't actually work.  Some places got around this by converting
the ID to unsigned, but this just hides the real issue from
unsuspecting coders.

Fixes https://gitlab.com/kicad/code/kicad/issues/4140
2020-04-01 15:59:52 +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
jean-pierre charras e811101567 fix a few Coverity warnings. 2020-04-01 09:34:44 +02:00
Jeff Young 13d3f57fce Implement a different solution to refreshing lib trees.
Fixes https://gitlab.com/kicad/code/kicad/issues/4110
2020-03-31 02:09:31 +01:00
Jeff Young add4c3d4ea Only append number to name if it already exists.
Fixes https://gitlab.com/kicad/code/kicad/issues/4130
2020-03-30 17:30:26 +01: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
Jeff Young 7f8f17bd82 Remove empty file. 2020-03-30 14:15:59 +01:00
Jeff Young 132d4d3ffa Clean up compiler warning. 2020-03-30 14:15:59 +01:00
Jeff Young 41b5872f12 Add ERC & DRC checks for unresolved variables. 2020-03-30 14:15:59 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
jean-pierre charras 9c2a260a27 Eeschema: Fix SCH_FIELD::SetPosition() bug
Fixes #4129
https://gitlab.com/kicad/code/kicad/issues/4129

Fixes #4062
https://gitlab.com/kicad/code/kicad/issues/4062
2020-03-30 13:26:14 +02:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
Jeff Young 5134856f18 Rationalise 3D settings data-structure.
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.

At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
jean-pierre charras 615deb40f3 Eeschema: move, mirror and rotate block: fix some issues.
Fixes #4111
https://gitlab.com/kicad/code/kicad/issues/4111
2020-03-28 13:17:59 +01:00
Jeff Young 6e27904791 More code hygiene. 2020-03-25 18:06:18 +00:00
Jeff Young ba36fc0009 Fix some Coverity issues. 2020-03-25 14:38:43 +00:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Jeff Young c4aed3a8de Add user-configurability of the LibEdit axes color. 2020-03-24 19:00:25 +00:00
Alexander cf25975876 EEschema: Fix back annotation
Repairs back annotation after some schematic code modifications
2020-03-24 10:53:00 +00:00
Sylwester Kocjan c7daca1e78 Eeschema: Adding new source types in SPICE model
NEW: Adds support in eeschema for three new source types
used in .TRAN simulation: single frequency FM, AM, and random.
2020-03-23 16:49:21 +00:00
jean-pierre charras cc47062b17 Fix a few Coverity issues 2020-03-23 16:17:22 +01:00
jean-pierre charras 4d9d1a5380 Fix a few compil minor warnings and Coverity minor issues 2020-03-22 09:45:51 +01:00
Jeff Young d25a63cd02 Don't allow selection flags to leak in to the libmanager cache.
Fixes https://gitlab.com/kicad/code/kicad/issues/4021
2020-03-21 23:25:08 +00:00
Jeff Young 66382db7dd Add some defensive code for selection anomalies.
Fixes https://gitlab.com/kicad/code/kicad/issues/4021
2020-03-21 20:55:50 +00:00
Jeff Young 93b7eacfb2 Fixup some Coverity issues. 2020-03-21 16:32:22 +00:00
Seth Hillbrand ba8c3a5582 Reverting part of cee973dc04
Iterators are invalidated by vector reallocation.  We need to keep the
count in the loop in order to have a valid position in the vector

Fixes https://gitlab.com/kicad/code/kicad/issues/4073
2020-03-20 08:44:21 -07: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 40b2eabfc1 Add a user-defined ratio for text offset from wire/bus.
Fixes https://gitlab.com/kicad/code/kicad/issues/2392
2020-03-17 12:50:31 +00:00
jean-pierre charras 0f0b9bdf87 SIM_PLOT_FRAME_BASE: gives a minimal size for right panels.
On KDE, a too small size can hang wxWidgets.
2020-03-17 08:27:34 +01:00
Jeff Young c9f8716414 Fix copy/paste error. 2020-03-16 19:17:21 +00:00
jean-pierre charras 53dfcd84cb Fix missing include
Fixes #4058
https://gitlab.com/kicad/code/kicad/issues/4058
2020-03-16 19:09:35 +01:00
Wayne Stambaugh 7dc64f08b7 Eeschema: implement s-expression schematic file formatter.
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format.  Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
2020-03-16 09:05:16 -04:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 222b222299 Improve ease of understanding around PCB <-> schematic links.
Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 11:06:15 +00:00
Jeff Young 095bede3ba Fix initialisation issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/4014
2020-03-13 17:28:53 +00:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
Jeff Young dc9882c3b9 Fix a few bugs with Sheet field dragging and rotating.
Fixes https://gitlab.com/kicad/code/kicad/issues/4046
2020-03-12 13:57:29 +00:00
Seth Hillbrand 9de7547c25 Partial revert of 134a7ba85
The margin fix prevented some schematics from printing.  Reverting in
favor of transitioning to the Cairo print base in eeschema
2020-03-11 15:24:08 -07:00
Jeff Young c699fb9e39 Move pin-to-pin errors to Setup Schematic. 2020-03-11 21:43:55 +00:00
Jeff Young 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Jeff Young b054e59a41 Get rid of cursors in preview panels. 2020-03-10 18:54:17 +00:00
Jeff Young bbf5ad6160 Improve dialog spacing and remove 'auto' type decls.
Also fixes a couple more coding style issues.
2020-03-10 18:54:17 +00:00
Wayne Stambaugh 8cc80e3b35 Add unit test for testing LIB_ARC objects.
Added tests for calculating radius angles and arc mid point.
2020-03-10 11:04:05 -04:00
Jeff Young 457f12a5df Remove extra SyncLibraries() call.
I imagine this was inserted to ensure the selected item is visible,
but selecting the item does that.  SyncLibraries() rebuilds the
entire tree, causing it to lose the user's scroll position.

Fixes https://gitlab.com/kicad/code/kicad/issues/4020
2020-03-08 15:18:19 +00:00
Jeff Young 3e34c1783f Added sheet border width, border color and background color.
Fixes https://gitlab.com/kicad/code/kicad/issues/2216
2020-03-08 15:18:19 +00:00
Jeff Young 0905ef8eb5 Autoplacement only handles mandatory fields for Sheets. 2020-03-08 15:18:19 +00:00
jean-pierre charras 37befc5a42 fix compil issue. 2020-03-07 20:49:45 +01:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young fe3e0307d8 Move sheet name and filename to SCH_FIELD architecture.
Only internal storage architecture has changed (so far).
2020-03-06 16:23:44 +00:00
Jeff Young dccc367864 Remove code missed in the modern-toolset move. 2020-03-06 16:23:44 +00:00
Jon Evans 34ceee14ed Improve color button padding 2020-03-06 08:14:12 -05:00
Jon Evans 5ed173ef1b ADDED: LibEdit can have a different color theme than Eeschema 2020-03-06 00:01:02 -05:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Jon Evans 8660b4c144 ADDED: New color theme editor and multi-theme support 2020-03-06 00:01:03 -05:00
Jon Evans 1e104d5bd4 Don't promote globals from locals on a different sheet
Fixes #4004
2020-03-05 19:08:55 -05:00
jean-pierre charras 3e78403576 Eeschema: cosmetic enhancement: display sheet UUID and path in dialog and bottom frame. 2020-03-05 13:20:38 +01:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 21469efa63 Make sure EESCHEMA definition gets passed into common.cpp.
Also includes a fix to seed timestamps that got incorrectly
written out as '00000000' because of the above.

Fixes https://gitlab.com/kicad/code/kicad/issues/3977
2020-03-04 02:04:18 +00:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Seth Hillbrand e359144305 Missed one file for previous commit
This is the actual fix for issue #3982
2020-03-03 14:05:49 -08:00
Seth Hillbrand 2cff50d7a8 Fix return value for new plugin
Even when we throw, we still need to provide a default return value that
will never be reached for MSVC

Fixes #3982 | https://gitlab.com/kicad/code/kicad/issues/3982
2020-03-03 14:02:37 -08:00
jean-pierre charras 30bc8fac5d Annotate dialog: fix incorrect list of changes in complex hierarchies
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.

The comparison uses now the sheet paths for ref and unit selection.
2020-03-03 19:41:19 +01:00
Seth Hillbrand 20fde2c16f eeschema: Fix find from RTree change
The RTree doesn't keep pins and fields in the tree, so we need to search
for them differently.

Fixes #3979 | https://gitlab.com/kicad/code/kicad/issues/3979
2020-03-03 09:35:12 -08:00
Wayne Stambaugh 18f9ba110d Fix minor symbol library s-expression formatter and parser bugs. 2020-03-03 08:06:23 -05:00
Wayne Stambaugh 9d6f64da9a Implement symbol library s-expression parser.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
2020-03-03 08:06:23 -05:00
Wayne Stambaugh 738a93db68 Fix s-expression symbol library formatter build issue due to UUID support. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh 1af503509d Fix s-expression symbol library formatter build issue. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh 1d205e4442 Fix points formatting in s-expression symbol library file formatter. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh e1900161a7 Eeschema: implement new symbol library file s-expression formatter.
CHANGES: Symbol library file format has been converted to s-expressions.

Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries.  For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
2020-03-03 08:06:22 -05:00
jean-pierre charras 20ca5a6973 Eeschema, dialog_edit_component_in_xxx: minor cosmetic enhancements.
Especially, UUID is bigger than old timestamp, so enlarge display widget.
2020-03-02 14:29:18 +01:00
Jon Evans 90bd351807 Properly flush color settings after migration
Also fix missing gerbview migration

Fixes #3965
2020-02-29 21:49:35 -05:00
Simon Richter 866aac9737 Clean up a few unused names of caught exceptions 2020-03-01 00:33:45 +00:00
Ian McInerney c31089d9f4 eeschema: Properly set bold and italic properties in global text edit dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/3963
2020-03-01 00:23:46 +00:00
Jeff Young 3f31d48b5e Use a more friendly method of ensuring unique sheet names.
Also fixes a bug where we were failing to respect the
forceKeepAnnotations flag when processing content nested in
a sheet.

Fixes https://gitlab.com/kicad/code/kicad/issues/3681
2020-02-29 00:07:57 +00:00
Seth Hillbrand 081ec393da eeschema: Load using root sheet if null
The root sheet is not set for pasting, in which case, we should utilize
the global root if needed.

Fixes #3956 | https://gitlab.com/kicad/code/kicad/issues/3956
2020-02-28 11:09:41 -08:00
Ian McInerney d5ceb8252e Clean up some warnings 2020-02-28 00:06:52 +00:00
Seth Hillbrand 245b778454 libedit: Fix speed of lib check
The symbol check output the HTML message for each item.  This is _very_
slow and can lock the system reponsiveness.  Changing to a queue/flush
method is much faster
2020-02-27 15:06:48 -08:00
Ian McInerney b2cc454878 Also verify that the .dcm is writable when saving library
Fixes https://gitlab.com/kicad/code/kicad/issues/3946
2020-02-26 19:21:29 +00:00
Jeff Young 0614bbc663 Silence a couple of compiler warnings. 2020-02-25 18:26:42 +00:00
Ian McInerney 879a8f4efb Rework the file history menus to not need references to the file history
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3741
2020-02-25 16:18:10 +00:00
Jeff Young c7ec110fba Only center focused items when they're not visible.
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Jeff Young c68b554c8e Promote PathsAndReferences from wxArrayString to first-class-citizen.
Keeping the data in an un-serialized format greatly simplifies usage,
and should make it more robust.
2020-02-24 23:19:17 +00:00
Jon Evans b4786e4121 Cross-probe into schematic using selection rather than HIGHLIGHTED flag 2020-02-23 22:07:18 -05:00
Jon Evans 41f59ab873 Avoid intermittent compiler crash in GCC 7.4
Somehow the previous way this statement was written can cause an
internal compiler crash on gcc 7.4.0-1ubuntu1~18.04.1 sometimes.
2020-02-22 21:26:48 -05:00
Seth Hillbrand 68be5fc1f4 Eagle: Set linewidth in polylines 2020-02-22 10:44:30 -08:00
Seth Hillbrand 62cc733fe6 Eagle: update RTree after moving schematic
After importing, some schmeatics are moved, item at a time.  When moving
schematic items, we need to update the RTree bounding box to allow
searching on position

Fixes #3915 | https://gitlab.com/kicad/code/kicad/issues/3915
2020-02-22 10:31:07 -08:00
Jeff Young 83057a48e1 Write Eeschema "AR" references in legacy timestamp format.
Also fixes a bug with path separators not getting added to the
m_PathsAndReferences array.

Fixes https://gitlab.com/kicad/code/kicad/issues/3925
2020-02-21 23:20:57 +00:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jeff Young 383403ef98 Push deprecation warning suppression down into boost.
Note: requires boost 1.67 or later.
Current boost version is 1.72.
2020-02-21 17:36:12 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jeff Young 2778dc90f3 Cleanup. 2020-02-20 23:52:32 +00:00
Jeff Young e69c82f45f Back out changes which updated the eeschema file format.
We'll wait until we have the new eeschema format to turn on UUID
generation for Eeschema.  Right now only Pcnbew generates full UUIDs.
2020-02-20 23:40:30 +00:00
Jeff Young 490f39a671 Remove obsolete code requiring unique sheet names. 2020-02-20 22:56:11 +00:00
Jeff Young e1d59337d1 Protect GCC #pragmas. 2020-02-20 22:20:44 +00:00
Jeff Young e033e394e7 Add visibility flags for sheet names and sheet filenames. 2020-02-20 21:29:52 +00:00
Jeff Young 81dd1d7a68 Timestamp-based paths were ugly. UUID-based ones are worse.
Show a human-readable path in the Edit Footprint dialog.
2020-02-20 21:29:52 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jeff Young d374abc79b Remove unused functionality. 2020-02-20 21:29:52 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras 2ca16c0b29 eeschema: fixes some issues related to translated and not translated field names.
When searching for fields, the code was sometimes comparing translated and not translated names.
This is an issue for mandatory fields, in non English languages.

Translated field names should be used only in messages.
2020-02-16 17:52:53 +01:00
jean-pierre charras 021eb2f3a8 Fix incorrect usage of a UTF8 char in a C string in code.
Using a UTF8 char inside a C string can work on unix, but not on Windows.
It must be explicitly converted in a unicode value inside a wide string
(like a wxString)
2020-02-16 10:21:36 +01:00
Ian McInerney a0698723b9 Auto-rotate sheet pins onto the top and bottom when moving
Fixes https://gitlab.com/kicad/code/kicad/issues/2178
2020-02-15 18:45:10 +00:00
Ian McInerney 4fef513a3f Fix library table panel path adding and cleanup duplicate dialog
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
2020-02-14 19:07:27 +00:00
Jeff Young 3ec360f15c Save pinned libraries in project.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 14:22:54 +00:00
Sylwester Kocjan 0aa6e43783 eeschema: dialog_edit_component: fixed removing negative number of rows from grid. 2020-02-14 15:07:06 +01:00
jean-pierre charras f17f10d2a6 Eeschema, DIALOG_UPDATE_FIELDS: ensure mandatory fields are put in list.
Add also a comment in common.cpp about using wxLocale instead of setlocale.

DIALOG_UPDATE_FIELDS has issues in non English languages, due to its design.
The fix for mandatory fields is only a partial fix that avoid major issues.
2020-02-14 13:07:13 +01:00
Ian McInerney 25b3cce474 Fix build error and cleanup overzealous refactor changes 2020-02-14 00:56:41 +00:00
Jeff Young 2017389f2d Pinning for library trees in FPEditor and SymbolEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
Wayne Stambaugh f502208211 Eeschema: fix selection thickness setting bug.
Fix minor control padding and alignment issues in the schematic display
options panel.
2020-02-13 09:19:40 -05:00
Seth Hillbrand 03f74c87a1 Update immediate mode location and restart wires
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool.  This was being checked in the
menu options, which only activated for tool commands in the context
menu.  Moving to the process event, we catch hotkeys as well.

This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.

Fixes #3891 | https://gitlab.com/kicad/code/kicad/issues/3891
2020-02-11 09:12:36 -08:00
Jon Evans 27fb664693 Fix polarity of "drag is drag" checkbox
Fixes https://gitlab.com/kicad/code/kicad/issues/3861
2020-02-11 09:22:18 -05:00
Karl Zeilhofer 1190e60dd4 Fixes issue #3820, text was not selected by default 2020-02-09 03:40:24 +01:00
jean-pierre charras ba9dedaaf3 Eeschema, point editor: constraint corners of a SHEET symbol to stay on 50 mil grid
Fixes #3867
https://gitlab.com/kicad/code/kicad/issues/3867
2020-02-07 10:06:01 +01:00
jean-pierre charras b0367f5a34 Eeschema: fix a crash on closing the schematic editor if the point editor is active.
If the point editor is active and a change is made, the tool was shut down after
deleting the board data, in the frame Dtor.
Therefore a crash happened because a call to GetScreen()->SetModify(); using a null pointer,
and after the test for modifications was done.
Now tools are stopped when closing the window, before any test for modifications.
2020-02-07 10:02:47 +01:00
Jonathan Warner 469c1c14ef Eeschema: adjusted component sorting to work better 2020-02-06 06:02:51 -07:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Ian McInerney 34e5b76c5f Add virtual constructors to some classes that should have them
This is more for safety from undefined deletion behavior than
anything else (it also silences the Clang -Wnon-virtual-dtor warning).
2020-02-05 22:19:14 +00:00
Jon Evans fe375b4419 Allow sheet pins to be strong drivers if they don't conflict with anything
Also try harder to match bus members in case one was renamed by a higher
priority label.

Fixes https://gitlab.com/kicad/code/kicad/issues/3797
2020-02-05 14:23:55 +00:00
Seth Hillbrand 7d64527eeb eeschema: Handle Rebuild for subcomponents
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection

Fixes https://gitlab.com/kicad/code/kicad/issues/3858
2020-02-04 22:49:43 -06:00
Jeff Young 2507f985ad Adjust justified text for mirroring and rotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/3737
2020-02-04 22:49:31 +00:00
Seth Hillbrand 134a7ba85d eeschema: Temporary fix for GTK printing offset
The full fix will be Cairo printing in v6

Fixes https://gitlab.com/kicad/code/kicad/issues/1907
2020-02-04 11:26:07 -06:00
jean-pierre charras 0049185d06 Eeschema: Speed up global changes in DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS.
Previously, OnModify() was called for a lot of items, even when not modified.
For large schematics, the calculation time was unreasonable ( several minutes)
It is now called only a few times.
2020-02-04 14:04:11 +01:00
Jon Evans ac875e26a8 Fix handling of SCH_PINs on multi-unit parts
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Seth Hillbrand 0645442704 eeschema: Fix crash in CheckAnnotate()
CheckAnnotate cannot do anything to an empty schematic, so abort before
referencing the list
2020-02-04 04:50:23 -06:00
Seth Hillbrand 9f7e0ef8e8 eeschema: Remove Bus-Bus and Place sheet pin buttons
Cleaning toolbars of functions that are superfluous or do not match well
to the user workflow.
2020-02-04 04:39:26 -06:00
Seth Hillbrand ec8a8ffcbc eeschema: Add connections to sheet pins
Set the sheet pin to be a junction connection point that ensures the
connectivity

Fixes https://gitlab.com/kicad/code/kicad/issues/3852
2020-02-04 04:14:16 -06:00
Jeff Young a04fdf64da Improve directory handling for Project Save As.
1) don't change directory names that we don't recognize
2) when we do, make sure the child files get copied to the
changed name.

Fixes https://gitlab.com/kicad/code/kicad/issues/3834
2020-02-03 15:08:01 +00:00
jean-pierre charras 0e51ed32f9 ADDED: Sim plot panel: option to plot on a white background or a black background. 2020-02-01 18:20:18 +01:00
jean-pierre charras b8108d294f Fix a few I18n messages, and minor wxWidgets alerts. 2020-02-01 14:06:56 +01:00
jean-pierre charras bb06e672e7 DIALOG_UPDATE_FROM_PCB: fix incorrect wording of an option.
Shared sheets can create issues in a complex hierarchy.
This is not related to sharing sheets between projects.
(Sharing sheets between projects is not supported by Kicad)
2020-01-30 09:22:21 +01:00
jean-pierre charras 5d5363396c Add automatically generated files needed for translations.
These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
2020-01-29 18:47:06 +01:00
Alexander Shuklin 3d0b3a51f3 Eeschema: Adding back annotation
ADDED: Back annotation algorithm,
eeschema back annotation dialog

CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
Seth Hillbrand 55eb687184 Eeschema: Force output ordering
The RTree does not have a deterministic iterator, so extracting items
may be in arbitrary order, causing issues as the schematic appears to
change when comparing to previous revisions.

This uses the SCH_ITEM comparison operator to for ordering by type, then
by custom sorting within type.

For the netlist, we choose the first available unit in the sheet for
each component.

Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-28 13:31:52 -08:00
Seth Hillbrand 128ec782dd Eeschema: Add bit that was missing from commit 7ac83ac64
This part of the check removes recursive sheets from the schematic when
loading and notifies the user that their schematic has been repaired.
2020-01-27 09:38:14 -08:00
Seth Hillbrand 7ac83ac64d Check recursion before appending
We need to ensure that the appended sheet does not already exist in the
parent hierarchy.  We do this for new sheets but need to check for
existing ones as well.

Fixes #3806 | https://gitlab.com/kicad/code/kicad/issues/3806
2020-01-27 06:30:45 -08:00
Seth Hillbrand b8920a9f5a Eeschema: Add protections to eeschema rtree
Prevents items from being mistakenly added to the tree that should not
be tracked in the tree.
2020-01-25 09:32:05 -08:00
Seth Hillbrand 84a697060f Don't insert pins/text when moving
Pins and component fields belong to the parent object and need to be
avoided when moving to prevent re-insertion on update.

Fixes #3804 | https://gitlab.com/kicad/code/kicad/issues/3804

Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-25 09:30:51 -08:00
jean-pierre charras 2cd4d2440c DIALOG_LABEL_EDITOR: very minor cosmetic change. 2020-01-24 10:15:56 +01:00
Wayne Stambaugh bc68c7d949 Symbol editor: fix several internal units bugs.
When opening the symbol editor without loading the schematic editor the
default text size setting is not loaded and was defaulting to the old mils
setting.  Convert the default text size to internal units in case the
symbol editor is launched first.

Set default line, bus, and selection highlight width to internal units.

Change new symbol dialog pin position offset control from a spin control
to a text control so the unit binder object can handle converting to and
from internal units.

Fixes #3802

https://gitlab.com/kicad/code/kicad/issues/3802
2020-01-23 15:45:51 -05:00
Seth Hillbrand bcc68b2dd9 eeschema: Re-load the RTree when we re-cache components
The components are reloaded when libraries change and when loading a
schematic.  The initial load does not contain pins and so bbox hits may
miss elements.

Fixes #3800 | https://gitlab.com/kicad/code/kicad/issues/3800
2020-01-23 10:06:56 -08:00
Seth Hillbrand 995bef8736 eeschema: Cleanup around pins and bboxes for components
This adjusts and tightens code around bboxes and pin sizes.
2020-01-23 10:06:56 -08:00
Seth Hillbrand eb4a2b0b89 Prevent overlapping junction inserts
2 pins + 1 line here would mark the same spot twice for a junction.
Using a set prevents the duplicates from being inserted
2020-01-23 10:06:56 -08:00
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Wayne Stambaugh 8f778b5a0f Eeschema: fix sheet Eagle plugin sheet placement bug.
Convert sheet position units from mils to internal units.
2020-01-22 12:26:53 -05:00
Wayne Stambaugh cd768d83c3 Eeschema: fix sheet minimum size bug.
Convert minimum sheet width and height definitions from mils to internal
units.

Add comment to sheet minimum width and height definitions to indicate
sizes are in mils.
2020-01-22 12:26:53 -05:00
Jon Evans 41725e6b07 Sort nets in netlist by name; generate ordered net codes 2020-01-22 14:59:02 +00:00
Seth Hillbrand ef00fa6008 Cleanup busses
At some point the buses were no longer being addressed in
SchematicCleanup().  This re-adds bus segments to the checklist for
segments to merge/clean
2020-01-22 05:53:40 -08:00
Ian McInerney 0d017e262c Update documentation and comment 2020-01-22 08:47:14 +00:00
Simon Richter f87dc08801 Readd <config.h> to ngspice.cpp
This file should really be included first from any source file, because it
contains platform specific workarounds.

This also groups includes a bit by source.
2020-01-22 08:38:45 +00:00
Jon Evans da222d96b1 Fix a few issues with bus unfolding
Bus submenus weren't sending events because tool wasn't set.
Net names need to be unescaped for display.
Unfolding wasn't drawing the new wire segments.
SCH_LINE_WIRE_BUS_TOOL could get caught in an infinite event handling loop.

Fixes https://gitlab.com/kicad/code/kicad/issues/3796
2020-01-21 22:02:46 -05:00
Jeff Young 384ff2539a Fix uninitialized variables. 2020-01-21 09:29:33 +00:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
jean-pierre charras d714773c22 Fix a minor compil warning. Add a wxASSERT in hierarch.cpp. 2020-01-18 18:23:21 +01:00
Wayne Stambaugh 462074d471 Eeschema: fix grid select dialog internal units bug.
Fixes #3782

https://gitlab.com/kicad/code/kicad/issues/3782
2020-01-18 11:28:01 -05:00
Seth Hillbrand a7d02a4f75 Recognize subckt blocks in spice
Spice lines defining circuit elements are contained in a .subckt ..
.ends block.  The intervening lines should be exported to the netlist as
well as the control lines.
2020-01-17 18:56:30 -08:00
Seth Hillbrand 40f97b55c7 Remove confused dynamic_cast
dynamic_cast could not resolve the cast chain leading to a null undo
point.  Since we know the item to be LIB_ITEM, we can use static_cast
anyway and avoid the overhead.

Fixes #3771 | https://gitlab.com/kicad/code/kicad/issues/3771
2020-01-16 06:17:04 -08:00
Jeff Young e4eedfa893 Catch exceptions from failed clone. 2020-01-13 15:27:16 +00:00
Jeff Young ac096fdf99 Catch exceptions from a failed library load. 2020-01-13 15:27:16 +00:00
Ian McInerney 81ee5edcaf Test dynamic_cast for safety from future changes 2020-01-13 15:22:26 +00:00
Ian McInerney 33a40e788b Add missing null check to library viewer control tool 2020-01-13 14:40:55 +00:00