Commit Graph

78 Commits

Author SHA1 Message Date
jean-pierre charras 01b6cd08b5 lib_edit_tool.cpp: fix a wxWidgets 3.0.4 compatibility. 2020-11-21 11:56:32 +01:00
jean-pierre charras 64636601b8 Eeschema: fix a Unicode/UTF8 management when pasting items from Clipboard.
Copy to clipboard save items (using S expr description) using wide strings
(not UTF8 encoding).
But Paste from clipboard was not converting the wide string to UTF8 string
when getting the stored data to send it as std::string to the S expr reader.

Fixes #6449
https://gitlab.com/kicad/code/kicad/issues/6449
2020-11-21 10:59:25 +01:00
Jeff Young 6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young f0d0e17aab Prepare for MODULE -> FOOTPRINT. 2020-11-13 15:16:24 +00:00
Wayne Stambaugh ae4614bfbd Symbol editor: do not allow paste into derived symbols.
Don't allow select all, copy, cut, paste, or duplicate if the current
symbol is an alias.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6050
2020-11-04 15:00:09 -05:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
Jeff Young 9065908859 Update SCH_SCREEN's RTree when moving items.
Or when modifying geometric shape/properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/5922
2020-10-30 15:26:07 +00:00
Jeff Young d785dae88b DIALOG_EDIT_COMPONENT_IN_LIB -> DIALOG_LIB_SYMBOL_PROPERTIES. 2020-10-22 10:41:21 +01:00
Marek Roszko 1538d737e7 Split out FILL_T to its own header to avoid spreading eda_item everywhere 2020-10-14 21:51:23 -04:00
Michael Kavanagh c40483d18a Cleanup: Move KiCad files into plugins folder 2020-10-12 16:36:08 +00:00
Marek Roszko 03074ae6ed Kick the selection tool to activate (and thus update cursors) on exiting some picker tools 2020-10-11 13:12:29 -04:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Seth Hillbrand 7565a08396 eeschema: Add select all to schematic and library editor
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Jeff Young f4ab14f32d Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
2020-08-10 12:41:52 +01:00
Jeff Young 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
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
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +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 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 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +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
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
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
Simon Richter 866aac9737 Clean up a few unused names of caught exceptions 2020-03-01 00:33:45 +00: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
Jeff Young 3d8150032f Fix some uninitialized variables found by Coverity. 2020-01-11 21:29:25 +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
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
Ian McInerney 079423c3cc eeschema: Remove unused include of eeschema_id.h 2020-01-03 16:04:54 +00: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 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 42f5c944b3 libedit: When pasting keep original multi-unit
Copy/Paste should keep the original items' designation for all units and
conversion type.  If it was specified in the original copy, we should
keep the same specification when pasting (but update for the current
frame)
2019-11-12 16:11:08 -08:00
Jeff Young 44a1cf9f1b Implement quiet-mode for selection clearing.
Also adds comments for exising quiet-mode calls.

Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young 0ff20c18a3 More direct selection handling.
Fixes: lp:1842750
* https://bugs.launchpad.net/kicad/+bug/1842750
2019-09-07 20:52:17 +01:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Jeff Young 206b40621e Fix bugs in Eeschema paste.
1) don't ASSERT; use exceptions (which can be caught) instead.
2) clean up LIB_LOGGER so it's only used during sync
3) fix typos in wxLogMessage() calls so they produce output.
4) throw on unrecognized token in loadContent().
5) if clipboard can't be pasted as content then paste as text.

Fixes: lp:1840172
* https://bugs.launchpad.net/kicad/+bug/1840172
2019-08-15 10:00:23 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Michael Kavanagh b414cbfada Cleanup doDelete ACTIONs 2019-08-12 13:49:55 -04:00
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Jeff Young c5fb8518d2 Redraw pins when placing when they are modified.
Fixes: lp:1839363
* https://bugs.launchpad.net/kicad/+bug/1839363
2019-08-08 14:09:42 +01:00
Jeff Young c624ee9cff Re-parent new objects on duplicate.
Fixes: lp:1838269
* https://bugs.launchpad.net/kicad/+bug/1838269
2019-08-01 21:40:18 -06:00
Jeff Young 03a33b6b56 Selection fixes for multi-part lib items.
1) Don't select pins from other units/conversions
2) Don't delete pins from other units/conversions

Fixes: lp:1838511
* https://bugs.launchpad.net/kicad/+bug/1838511
2019-07-31 22:34:24 -06:00
Jeff Young 815602d1af Fix missing AF_ACTIVATE flags on some tools.
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06:00
Jeff Young 0b08e4dcd2 Deactivate other tools when running one based on a PICKER.
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".

Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young 58ca5b71a9 A more robust fix for 36f1d023f0.
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.

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

Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
Jeff Young 36f1d023f0 Make sure Push/PopTool() go in the right order.
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool().  The new
tool is therefore pushed before the old tool is popped.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00