Commit Graph

1332 Commits

Author SHA1 Message Date
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Seth Hillbrand 94f682c6bd Fix bug in linux compile
wx 3.0 does not have an emplace_back method for wxVector
2020-01-10 16:41:55 -08:00
Seth Hillbrand d1a0102e84 eeschema: Fix print order between worksheet and screen
The worksheet should be drawn behind the screen.
2020-01-10 16:33:53 -08:00
Jeff Young b54a42ba53 Clean up dialog (including uninit var from Coverity scan). 2020-01-10 22:32:50 +00:00
Jeff Young 8576a4a067 Fix unchecked array access (from Coverity scan). 2020-01-10 22:32:50 +00:00
Jeff Young cc5a42ff41 Minor cleanup and performance. 2020-01-10 22:32:50 +00:00
Jeff Young ae74815ff0 Go to seleted object when opening Symbol Fields dialog.
Note: only active if there is a single item selected and it (or
its parent) is a component.
2020-01-10 22:32:50 +00:00
Jeff Young 5e5edd03f6 Implement super- and subscript printing and plotting for eeschema. 2020-01-10 22:32:49 +00:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Franck Jullien ea218bc722 eeschema: Allow hierarchy navigator to stay open
ADD: User can now decide to keep the hierarchy navigator open while working
on a schematic.

This behavior can be configured in eeschema->preferences->eeschema->Editing options.
2020-01-03 21:08:40 +01:00
Wayne Stambaugh 4bab82e149 Eeschema: fix text limit bug due to internal units scaling.
Change default text size and anchor positions back to mils.  Internal
units need to be converted at the source, otherwise the size will get
converted twice in the schematic editor configuration code which will
result in the default text size being off by the conversion factor.

Fixes #3730

https://gitlab.com/kicad/code/kicad/issues/3730#
2020-01-03 09:29:38 -05:00
jean-pierre charras eaaa4eb63a fix minor compil warnings 2019-12-31 15:03:27 +01:00
Wayne Stambaugh 371c5a9259 Eeschema: fix symbol properties dialog bug.
Derived symbols were causing the symbol properties grid to assume that
the reference could not be edited because derived symbols inherit the
reference from the parent symbol.  The flattened symbols in the schematic
still have the parent set which cause the issue.  Clearing the parent of
the flattened symbol resolves the issue.

Fix a minor bug in the symbol information of derived symbols show in the
symbol chooser dialog.

Fixes #3723

https://gitlab.com/kicad/code/kicad/issues/3723
2019-12-31 08:05:52 -05:00
Mark Roszko b84fe2b703 ADDED: Editing style of multiple graphical lines at the same time.
Provides the ability to quickly set the style of multiple lines.  This is only allowed if the selection includes _only_ graphical lines.
2019-12-31 04:05:51 +00:00
Wayne Stambaugh 8bf9a4c811 Symbol editor: fix pin increment setting for 100nm units. 2019-12-30 15:43:10 -05:00
jean-pierre charras 19e92c9d11 Eeschema: replace dialog_bom_help.html by dialog_bom_help.md The .md files are smaller and translatable. 2019-12-29 11:16:18 +01:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Ian McInerney e6e2cf47fd eeschema: Fix return ID check in annotate dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/3708
2019-12-25 23:17:00 +00:00
jean-pierre charras b53501d8cf Eeschema: very minor change: make a string shorter to reduce the panel size
This is not noticeable in English, but noticeable in translated language.
Frequently, strings are longer once translated.
2019-12-21 11:19:08 +01:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Ian McInerney 3ca231aa78 Rename lib viewer frame files to use the class name 2019-12-19 14:05:46 +00:00
jean-pierre charras d9de28de35 Eeschema: usability enhancement.
ADDED: a config option to select (when clicking on a pin) the parent symbol
or only the pin.

Previously, when cliking on a pin, the parent symbol was selected.

Allowing the pin selection is mandatory in cross probing, and to display the pin
characteristics in some cases, for instance if a pin is flagged by the ERC tooL.
2019-12-19 12:41:51 +01:00
Wayne Stambaugh 2b920ffa04 Symbol editor: inheritance symbol editing bug fixes.
There is no need to create a new root symbol and re-parent all derived
symbols when renaming a root symbol.  Just rename the buffered root
symbol.

Test for duplicate symbol names when validating the properties dialog
information to prevent broken symbol pointers.

Fix a field drawing bug when editing derived symbols.

Fix bug to insure duplicate symbol names cannot exist in a library.

Fixes kicad/code/kicad#3654

Fixes kicad/code/kicad#3672
2019-12-16 10:11:06 -05:00
Wayne Stambaugh 3e431d0d39 Symbol editor: fix inherited symbol editing bug.
The library manager update part function was orphaning the root symbol
of derived symbols when the root symbol was edited.  Re-parent the
inherited symbols when updating a root symbol.

Update the mandatory field attributes whenever the parent is set for
derived parts.  This will show the fields with the correct attributes
in the symbol editor and viewer.

Using std::unique_ptr to hold the current symbols was deleting the
pointer on symbol selection changes causing the pointer in the library
manager buffer to be stale in some cases.  Revert back to using a
simple pointer and manual clean up as required.

Prevent derived symbols from being saved to a different library to
prevent orphaned symbols.

Fixes kicad/code/kicad#3649
2019-12-13 16:51:59 -05:00
Jeff Young c5df98a170 Clean up spacing in Eeschema Display Options.
Also adds a note for editing highlight color.
2019-12-11 20:50:38 +00:00
Mark Roszko a130ed9968 Fix improper SetValue usage on radio buttons 2019-12-09 00:40:08 -05:00
Jonatan Liljedahl 034bfb0919 eeschema: More work on selection highlight thickness
Bring back old zoom-level factor scaling constant and
change selection width to absolute unit instead of
floating point multiplier.
2019-12-07 09:33:32 +00:00
Jonatan Liljedahl 681f6bc707 Eeschema: Add option for selection highlight thickness
ADDED new option to set selection highlight thickness.
Also change selection shadow width constants to
make the selection thickness change less drastically
with the zoom level.
2019-12-07 09:33:32 +00:00
Jean-Pierre Charras 97b0b20a65 Fix properties dialog bug in symbol library editor.
Remove unused panel rather than calling Hide() method which draws the
hidden page as a background of the shown page.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Jonatan Liljedahl e517069a51 Eeschema: Add options for selection appearance
ADDED: Three new options that affects selection appearance:
- Draw selected text items as box
- Draw selected child items
- Fill selected shapes
2019-11-26 19:57:11 -08:00
jean-pierre charras e6346c7408 Pcbnew: fix crash on Linux (when opening Edit Spice model in component properties)
It happens when the spice library model shown in dialog is a large file.
Looks like the wxTextCtrl used to displays the library content
creates the crash ( GKT bug?) for large texts.

The fix is to replace this wxTextCtrlt by a wxStyledTextCtrl.
It has advantages (does not crash... and much faster display) and
inconvenients (cannot disable editing).

Fixes: lp:1853161
https://bugs.launchpad.net/kicad/+bug/1853161
2019-11-21 13:13:15 +01:00
Seth Hillbrand 9f8eb350f7 eeschema: One more sort case
This fixes the same issue as f4a1fef3b requiring an absolute inversion
when sorting ascending vs descending
2019-11-13 11:48:22 -08:00
Seth Hillbrand f4a1fef3b0 Adjust pin table sort
The sort routine requires the value to be true with a is strictly lower
than b.  But just inverting the '<' doesn't yield strictly lower, it
includes '>='.  This causes items to jump in the list.
2019-11-12 17:24:57 -08:00
Jonatan Liljedahl c71202d143 Eeschema: simulation: allow adding signals by name like V(/out) or I(R1)
NEW: A text entry allows adding signals by name. This includes vectors
not in the signal list, which is useful for plotting calculated vectors
like `let AB=V(a)*V(b)`. It's also a faster way to add a signal if you
know its name already.

Fixes: lp:1851373
* https://bugs.launchpad.net/kicad/+bug/1851373
2019-11-11 09:05:37 -05:00
Jeff Young 9d288968e7 Be more explicit about extent of schematic cleanups.
The new connectivity algorithm had a tendency to cleanup
globally, but that could insert undo records from other sheets
into the current screen's undo stack.  Needless to say, this
was a recipie for segfaults.

Fixes: lp:1846247
* https://bugs.launchpad.net/kicad/+bug/1846247
2019-11-10 23:25:54 +00:00
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
Seth Hillbrand 7b2d6ab40e eeschema: Allow mult-part placement option
When placing a new component in the schematic, this allows the user to
iterate through all units in the selected component without re-opening
the choose part dialog.  It also allows the optional addition of
multiple copies of the same component to be placed in the schematic.

Fixes: lp:1806217
* https://bugs.launchpad.net/kicad/+bug/1806217
2019-10-29 12:20:14 -07:00
jean-pierre charras 23e09d3de7 some other WXDEBUG replacement 2019-10-14 12:38:52 +02:00
jean-pierre charras 2a9157ca99 Pcbnew, multiline graphic text dialog: strip extra \r in EOL (\n is enough) on Windows.
Fixes: lp:1843279
https://bugs.launchpad.net/kicad/+bug/1843279
2019-09-10 10:57:04 +02:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Seth Hillbrand 90b5cd3032 Unify text edit dialog behavior
This makes the pcbnew multiline text editor natively accept tabs in the
same manner as eeschema and extracts key handling routines to the shim
to allow undo/redo.

Also allows Ctrl-Y under Linux in addition to other platforms.  While
not as popular as Ctrl-Shift-Z, it is utilized for Redo in some contexts
2019-09-05 14:11:02 -07:00
Jeff Young fc50ddda64 Implement Paste Special for eeschema.
Also changes the normal paste behaviour to only clear annotations
when a collision is found.

Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Seth Hillbrand 85eed87b28 eeschema: Modify all units at the same time
When editing symbol library reference, this ensures that all units are
modified by the same action and the component is not represented by its
subunits.

Fixes: lp:1834509
* https://bugs.launchpad.net/kicad/+bug/1834509

(cherry picked from commit 80e0d848f2)
2019-08-26 20:43:05 -07:00
Jeff Young bc0e67579c Change OK/Cancel to MSW order and move some other dialogs to new system.
(There's no point in following the OSX OK/Cancel order as you can't
tab to buttons on OSX anyway.)
2019-08-26 18:36:35 +01:00
Jeff Young 6b6e9eddee Return control of Symbol and Footprint chooser col widths to user.
The auto-calculation wasn't working out and even with it some users
wanted control.

Fixes: lp:1796774
* https://bugs.launchpad.net/kicad/+bug/1796774
2019-08-26 18:27:49 +01:00