Commit Graph

16 Commits

Author SHA1 Message Date
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
Ian McInerney 960b553a70 Cleanup type casting in EE toolbase
* Ensure the lib edit undo checks for pointer validity
* Assert that the frames are the correct type (satisfies coverity)
* Convert C casts to C++ casts
2020-01-12 19:47:13 +00: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
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
Jeff Young 69afa27a5f Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset.  It also reduces a whole bunch of duplicated
data.
2019-05-15 17:50:52 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Jeff Young 792c4328aa Cleanup. 2019-05-10 21:40:08 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young 207900e4f9 Move libedit message panel updating to the Inspection Tool. 2019-05-06 15:31:23 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
Jeff Young 8a54b1b3b7 Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one
of many addressed by this commit.

Fixes: lp:1798449
* https://bugs.launchpad.net/kicad/+bug/1798449
2018-10-18 12:12:48 +01:00
Jeff Young d7178c7833 Implement GAL refresh for a bunch of operations. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski c024fce625 eeschema-gal: moved libedit to a separate directory 2018-10-09 11:08:52 +01:00
Renamed from eeschema/libedit_undo_redo.cpp (Browse further)