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.
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.
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
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.
- new function SCH_SHEET_LIST::SortByPageNumbers() which uses SCH_SHEET::ComparePageNum for the sorting algorithm
- SortByPageNumbers() is called after every call to BuildSheetList()
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.
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.
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
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
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
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.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects. It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic). This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet. This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references. It also allows the root schematic from one project
to be uses as a sub-sheet in another project.
When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs. This is done to ensure there
are no sheet path instance clashes between projects. That being said,
there are no checks for this. It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
Also fixes a bug where we were depending on the old deque stuff's
deterministic traversal, which isn't provided by the new RTree stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/2433
This moves EESchema DLIST structures to rtree. These changes are more
fundamental than the pcbnew changes from 9163ac543888c01d11d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
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.
Netlists do not accept any char in netnames (especially spice).
They must use only "/" as root sheet path name.
Especially _( "<root sheet>" ) breaks netlists because:
- there is a space in name, and special chars (< and >)
- it is a translatable name. so the actual name cannot be managed.
- most of netlist code in Kicad expects a "/" as root path.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.
Lastly, regularizes the Unsaved Changes strings between the apps.
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
Three instances of variables named "reference" shadow a typedef
within std::vector producing:
warning: declaration of ‘reference’ shadows a previous local [-Wshadow]
note: shadowed declaration is here
typedef typename _Alloc_traits::reference reference;
This patch works around by renaming "reference" to "schReference".
This also makes the dialog modeless so that one switch between
sheets while annotating to choose the base numbers for each
sheet (assuming they don't like the base number we pick because
of the order of the sheets).
Fixes: lp:1154131
* https://bugs.launchpad.net/kicad/+bug/1154131
Simplify some of the library editing code. There have been a few minor
changes in the behavior of the editor. If the current symbol is deleted
from the library, the next symbol in the library is not loaded. The
deleted symbol is cleared and the current symbol is empty.
Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.
Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.
Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.
Add method to expand URI to LIB_TABLE_BASE.
Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.
Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.
Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.
Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString. Please note that only the library ID name is used to
search the list of libraries. The library nickname is ignored. Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.
Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
* coding standard fixes
* library part not library component (no such thing as a library component)
* string concatenation fix
* and an inline harmless debug/dump function
* Derive SCH_SHEET_LIST from std::vector rather than using internal array
management. Change all internal code to use iterators or array operator
in loops.
* Allow creation of empty SCH_SHEET_LIST for external population for plotting
and printing.
* Clean up print an plot code to take advantage of new SCH_SHEET_LIST behavior.
* Make BuildSheetList() public so list can be populated after creation.
* Update all instances of SCH_SHEET_LIST with the appropriate SCH_SHEET
object on initialization.
* Create const and non-const version of SCH_SHEET_PATH::GetSheet().
* Derive SCH_SHEET_PATH from std::vector< SCH_SHEET* > and remove unnecessary
assignment operator and list management functions.
* Remove function BuildSheetPathInfoFromSheetPathValue() since it was
effectively an assignment operation.
* Replace all calls to BuildSheetPathInfoFromSheetPathValue() with assignment
operator.
* Replace list management functions with vector management functions.
* Fix a error message that wasn't translatable.
* Move FindSheetByName() function from SCH_SHEEET_PATH to SCH_SHEET object
and update calls to FindSheetByName() accordingly.
* Remove SCH_SHEET_PATH::FindSheet() which was unused.
* Add sorting option to SCH_SHEET::GetSheets().
* Add const and non-const version of GetRootSheet() to SCH_SHEET.
* Add GetSheetPaths() function to SCH_SHEET which behaves the same way
as SCH_SHEET_LIST except it uses standard C++ containers and is a much
simpler design.
* Add function to get a list pointers to this sheet and all of it's sub-sheets
to SCH_SHEET.
* Remove unused function SetFootprintField() from SCH_SHEET_PATH.
* Add sheet number that is set by schematic file load order. This duplicates
the previous SCH_SHEET_PATH behavior.
* Uncouple SCH_REFERENCE and SCH_REFERENCE_LIST from SCH_SHEET_PATH.
* Add - operator to SCH_SHEET for comparison purposes. This duplicates the
behavior of SCH_SHEET_PATH::Cmp().
* Uncouple SCH_COMPONENT::GetRef() from SCH_SHEET_PATH and use SCH_SHEET
instead.
* Uncouple SCH_COMPONENT::GetUnitSelection() from SCH_SHEET_PATH and use
SCH_SHEET instead.
* Fix all calls to GetRef() and GetUnitSelection() to pass a pointer to the
appropriate SCH_SHEET object instead of an SCH_SHEET_PATH object.