Commit Graph

205 Commits

Author SHA1 Message Date
jean-pierre charras 27d47743cd SYMBOL_TREE_MODEL_ADAPTER: fix an annoying issue on Windows.
Force immediate deletion of the SYMBOL_TREE_MODEL_ADAPTER (do not use Destroy() )
because on Windows, APP_PROGRESS_DIALOG has some side effects on the event loop
manager. A side effect is the call of ShowModal() of a dialog following
the use of SYMBOL_TREE_MODEL_ADAPTER creating a SYMBOL_TREE_MODEL_ADAPTER
has a broken behavior (incorrect modal behavior).
2021-01-01 13:09:50 +01:00
Jeff Young 8a720ef305 Update naming. 2020-12-25 23:37:01 +00:00
Jeff Young bb232e6ac6 Unify LIB_IDs now that both are stored in sexpr files.
Fixes https://gitlab.com/kicad/code/kicad/issues/6764
2020-12-18 00:30:26 +00:00
Jeff Young f29f052aa7 Update an outlier from the component -> symbol rename. 2020-12-08 18:30:14 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young bfd8a62852 Formatting and naming conventions. 2020-11-07 18:50:30 +00:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
jean-pierre charras 7865d8de43 more cleanup about removing useless include 2020-10-02 15:50:46 +02:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Seth Hillbrand a029feb029 eeschema: Add component needs to be Modal
Adding a component in eeschema accesses the footprint table as well as
the symbol table.  There are no safe edits that can be taken while this
window is open, so we force it to be Modal instead of QuasiModal

The issue is addressed but reveals additional possible problems that
this commit fixes

Fixes https://gitlab.com/kicad/code/kicad/issues/5206
2020-08-18 11:23:18 -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 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
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
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
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +01: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
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 079423c3cc eeschema: Remove unused include of eeschema_id.h 2020-01-03 16:04:54 +00:00
Ian McInerney 3ca231aa78 Rename lib viewer frame files to use the class name 2019-12-19 14:05:46 +00: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 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
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young 21b315f2af Finish removing GetCurItem() from eeschema. 2019-05-05 17:14:30 +01:00
Jeff Young 1e5334f5d4 Implement DeMorgan conversions in modern toolset. 2019-05-05 17:14:30 +01:00
Jeff Young 58ba573038 Handle cascading selections in placement.
See https://forum.kicad.info/t/call-for-testers-eemodern/16663/32
2019-05-05 17:14:29 +01:00
Jeff Young f81007f74b Some clean-up and moving message panel update to selection event. 2019-05-05 17:12:59 +01:00
Jeff Young f200c61897 Start transitioning block operations to modern toolset. 2019-05-05 17:12:59 +01:00
John Beard 42d20cbd96 Pcbnew: use same null check as eeschema for recently used
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.

Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.

The same logic in the symbol tree is already handled in the
same way.
2019-04-29 16:52:39 +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 ecfa05e2ca Allow adding symbols/footprints from editors and browsers.
This was always possible from modal browsers and from the footprint
editor, but it's now also possible from non-modal browsers and the
symbol editor.

Fixes: lp:920380
* https://bugs.launchpad.net/kicad/+bug/920380
2019-04-16 16:20:51 +01:00
Jeff Young 32c86a4ca4 Move place symbol to modern toolset. 2019-04-16 16:20:51 +01:00
Seth Hillbrand 1437e56b72 eeschema: Prevent invalid '0' element in components
In the component, an m_unit/m_convert element is 1-indexed as opposed to
the library where they are 0-indexed.  The 0-index in the library is
reserved for those elements that are shared across all conversion/unit
whereas it is invalid for the component.

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

(cherry picked from commit c4be74a9d0)
2019-04-15 12:40:59 -07:00
Jeff Young 3ace73fbdd Fold various SCH pin shadow data structures into SCH_PIN. 2019-04-03 10:18:11 +01:00
Jon Evans f1882f333e Don't call OnModify() before placing new parts
Remove unnecessary calls to TestDanglingEnds()

Disable real-time connectivity updates for now

Revert "Remove unnecessary calls to TestDanglingEnds()"

This reverts commit d93e3894f2bcd6239862ac9eae0cb2f994b9d52a.

Remove debug code
2019-03-31 19:58:08 -04:00
Jon Evans 3c714f1d8c Fix undo handling of SchematicCleanUp 2019-03-31 19:55:57 -04:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
Seth Hillbrand bf814b25da eeschema: Update pin cache after conversion
Pin caches need to be updated when the unit is converted as the pin
location may have changed in conversion.

Fixes: lp:1816207
* https://bugs.launchpad.net/kicad/+bug/1816207
2019-02-15 18:30:45 -08:00
Jeff Young f425f49c19 Fetch active sym before launching browser so we can start with it.
Fixes: lp:1813882
* https://bugs.launchpad.net/kicad/+bug/1813882
2019-01-30 21:50:35 +00:00
Jeff Young ed6c68a1e3 Clean up handling of component fields.
In particular the datasheet field and how its handled with aliases,
but also cleaning up duplicated functionality around aliases and
libids.
2018-11-22 21:31:45 +00:00
Jeff Young 1114b5cfa9 Refresh item when its dangling state changes.
Fixes: lp:1797996
* https://bugs.launchpad.net/kicad/+bug/1797996
2018-10-16 17:07:59 +01:00
Jeff Young 97c83766db Refresh issues around sheet pins. 2018-10-09 11:08:56 +01:00
Jeff Young ca3751fbbb Add GAL refresh for some more commands and remove unused DC params. 2018-10-09 11:08:56 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young dbd3900e28 Add comments and show recently used even when empty. 2018-08-21 11:20:17 +01:00
Jeff Young be1d6113d6 More performance enhancements.
Be more intelligent about sorting lib tree items.  (Footprint
entries, for instance, come out of an already-sorted list.)

Don't recreate menus twice when laoding Footprint Editor.

More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.

For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.
2018-08-06 13:49:27 +01:00
Jeff Young 97f7bd4cb9 Push component tree down into common.
Precondition to reusing component tree for footprints.
2018-08-01 09:35:45 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00