Commit Graph

141 Commits

Author SHA1 Message Date
Wayne Stambaugh b7af66e3f9 Eeschema: fix broken page numbers when renaming a sheet file name.
Always use full sheet paths when storing sheet instances.  Partial sheet
paths cannot be full resolved resulting in lost page numbers when renaming
sheet file name.

Fixes #9782
2021-12-09 12:56:03 +00:00
Wayne Stambaugh a03e6e4926 Revert "Eeschema: fix broken page numbers when renaming a sheet file name."
This reverts commit a468a79948.
2021-12-06 07:47:18 -05:00
Wayne Stambaugh a468a79948 Eeschema: fix broken page numbers when renaming a sheet file name.
Remove duplicate instance data saved in both root SCH_SCREEN and SCH_SHEET
objects that was causing them to be out of sync.  All sheet instance data
is stored in the SCH_SHEET object itself and rebuilt on the fly so it is
always current.

Remove Get/SetPageNumber from SCH_SHEET_PATH object so it doesn't obfuscate
where the actual sheet page number information exists.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9782
2021-11-30 08:11:24 -05:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Wayne Stambaugh fdcc49d3ee Eeschema: fix saving hierarchical sheets in stand alone mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8209
2021-05-27 16:01:36 -04:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista 91fd28c4be Refactor saving sheet and symbol instances in SCH_SEXPR_PLUGIN::Format
Avoid code duplication by moving all common code to a new function
SCH_SEXPR_PLUGIN::saveInstances

Also fixes a bug that was resulting in footprint and value information
not being saved for subsheets that were root sheets in a different
project.
2021-05-03 16:54:42 +01:00
Roberto Fernandez Bautista 2c75911669 Fix SortByPageNumbers: use Sheet Name when page numbers are equal 2021-05-03 16:54:42 +01:00
Roberto Fernandez Bautista 9b35757e18 Refactor AppendSymbol and AppendMultiUnitSymbol 2021-04-30 11:03:21 +00:00
Roberto Fernandez Bautista 0c91bea751 Fix eeschema reannotation: ensure no duplicate references are created
Also implements reannotation of a selection

ADDED: Ability to reannotate a selection in eeschema

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2209
2021-04-30 11:03:21 +00:00
Roberto Fernandez Bautista be51be22a7 Update Page Number when Duplicating or Pasting sheets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7872

Also, update hierarchy before renaming pasted sheets
Avoids duplicate sheet names when pasting multiple sheets
2021-03-23 02:48:07 +00:00
Jeff Young 2e129d9b47 Naming conventions and other cleanup. 2021-03-19 23:06:19 +00:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
Jeff Young 2a7e60960a Use standard mirror icons & terminology.
Also use standard group icons.

Also put both (and rotate commands) in toolbar.

Fixes https://gitlab.com/kicad/code/kicad/issues/7504
2021-02-16 21:11:36 +00:00
Dominik Wernberger bb2881a5ab Make RENDER_SETTINGS argument const 2021-01-12 20:51:31 +00:00
Roberto Fernandez Bautista b1270bc9ab eeschema page numbers: match print and plotting ordering to page number ordering
- new function SCH_SHEET_LIST::SortByPageNumbers() which uses SCH_SHEET::ComparePageNum for the sorting algorithm
- SortByPageNumbers() is called after every call to BuildSheetList()
2020-11-30 16:49:33 +00:00
Jeff Young c89676e39d Require client to specify whether they want resolved values or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/6408
2020-11-17 21:36:48 +00:00
Jeff Young 8c5c902fa3 Re-write IntersheetRefs on top of SCH_FIELDs and textVars.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.

As an important side-effect this also fixes the undo issues with
intersheet refs.
2020-11-17 16:05:49 +00:00
Jeff Young b227d2b910 More component -> symbol. 2020-11-15 20:23:15 +00: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
Jeff Young c1ecb4257d Fix error with empty sheet paths. 2020-11-02 18:05:56 +00:00
Michael Kavanagh 20bb3b194f Eeschema: Display the root sheet name to the user
Instead of just `/` denoting the root sheet, use the filename
in preparation for non-hierarchical multi-sheet schematics
2020-11-02 17:50:13 +00:00
Michael Kavanagh 644546cd83 Cleanup PathHumanReadable and remove dead code
Fixes https://gitlab.com/kicad/code/kicad/issues/6152
2020-11-02 17:50:13 +00:00
Wayne Stambaugh f7084afb72 Eeschema: fix annotation bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6154
2020-10-26 13:01:36 -04:00
Jeff Young 51dff1c822 Live update sheetpath.
Also makes it a static text to get rid of the spacing/clipping
problems it has been having.

Fixes https://gitlab.com/kicad/code/kicad/issues/6152
2020-10-25 13:37:40 +00:00
Wayne Stambaugh 8ff51d8899 Eeschema: add schematic sheet page number.
The groundwork has now been laid for per sheet instance data.  Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.

ADDED: Support for user defined schematic page numbers.
2020-10-19 14:05:45 -04:00
Jeff Young 63a0f537d8 Performance enhancement: check hierarchy validity only when necessary. 2020-10-05 13:49:29 +01:00
jean-pierre charras 7865d8de43 more cleanup about removing useless include 2020-10-02 15:50:46 +02:00
Jeff Young 7b05e456cc Bug fixes for multiple symbol instances in complex hierarchies
1) use SCH_COMPONENT::GetRef(), GetValue() and GetFootprint() when
instance-specific info is needed
2) update UpdateAllScreenReferences() to handle value and footprint.
3) BACKANNO is CvPcb's handler, not back annotation's handler.  Which
means it needs GUI behaviour, not back annotation behaviour.

Fixes https://gitlab.com/kicad/code/kicad/issues/5520
2020-09-06 13:57:14 +01:00
Jeff Young 133fb5cded Minor code cleanup. 2020-09-06 11:28:58 +01:00
Jeff Young be15053745 Allow back-annotation of differing values and footprints.
Also fixes a couple of bugs where resolving a textVar reference
to the refDes or unit wouldn't get the correct value in a
hierarchical schematic. (Unlogged.)

Fixes https://gitlab.com/kicad/code/kicad/issues/5397
2020-09-04 15:21:56 +00:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01: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 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
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
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
Jon Evans f7578eb038 Implement new native netlist QA test 2020-05-23 21:04:11 -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