Iterators are invalidated by vector reallocation. We need to keep the
count in the loop in order to have a valid position in the vector
Fixes https://gitlab.com/kicad/code/kicad/issues/4073
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format. Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
I imagine this was inserted to ensure the selected item is visible,
but selecting the item does that. SyncLibraries() rebuilds the
entire tree, causing it to lose the user's scroll position.
Fixes https://gitlab.com/kicad/code/kicad/issues/4020
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.
The comparison uses now the sheet paths for ref and unit selection.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
CHANGES: Symbol library file format has been converted to s-expressions.
Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries. For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
The symbol check output the HTML message for each item. This is _very_
slow and can lock the system reponsiveness. Changing to a queue/flush
method is much faster
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.
Fixes https://gitlab.com/kicad/code/kicad/issues/3741
After importing, some schmeatics are moved, item at a time. When moving
schematic items, we need to update the RTree bounding box to allow
searching on position
Fixes#3915 | https://gitlab.com/kicad/code/kicad/issues/3915
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
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.
Using a UTF8 char inside a C string can work on unix, but not on Windows.
It must be explicitly converted in a unicode value inside a wide string
(like a wxString)
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
Add also a comment in common.cpp about using wxLocale instead of setlocale.
DIALOG_UPDATE_FIELDS has issues in non English languages, due to its design.
The fix for mandatory fields is only a partial fix that avoid major issues.
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool. This was being checked in the
menu options, which only activated for tool commands in the context
menu. Moving to the process event, we catch hotkeys as well.
This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.
Fixes#3891 | https://gitlab.com/kicad/code/kicad/issues/3891
If the point editor is active and a change is made, the tool was shut down after
deleting the board data, in the frame Dtor.
Therefore a crash happened because a call to GetScreen()->SetModify(); using a null pointer,
and after the test for modifications was done.
Now tools are stopped when closing the window, before any test for modifications.
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection
Fixes https://gitlab.com/kicad/code/kicad/issues/3858
Previously, OnModify() was called for a lot of items, even when not modified.
For large schematics, the calculation time was unreasonable ( several minutes)
It is now called only a few times.
Shared sheets can create issues in a complex hierarchy.
This is not related to sharing sheets between projects.
(Sharing sheets between projects is not supported by Kicad)
These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
ADDED: Back annotation algorithm,
eeschema back annotation dialog
CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
The RTree does not have a deterministic iterator, so extracting items
may be in arbitrary order, causing issues as the schematic appears to
change when comparing to previous revisions.
This uses the SCH_ITEM comparison operator to for ordering by type, then
by custom sorting within type.
For the netlist, we choose the first available unit in the sheet for
each component.
Fixes#3811 | https://gitlab.com/kicad/code/kicad/issues/3811
We need to ensure that the appended sheet does not already exist in the
parent hierarchy. We do this for new sheets but need to check for
existing ones as well.
Fixes#3806 | https://gitlab.com/kicad/code/kicad/issues/3806
When opening the symbol editor without loading the schematic editor the
default text size setting is not loaded and was defaulting to the old mils
setting. Convert the default text size to internal units in case the
symbol editor is launched first.
Set default line, bus, and selection highlight width to internal units.
Change new symbol dialog pin position offset control from a spin control
to a text control so the unit binder object can handle converting to and
from internal units.
Fixes#3802https://gitlab.com/kicad/code/kicad/issues/3802
The components are reloaded when libraries change and when loading a
schematic. The initial load does not contain pins and so bbox hits may
miss elements.
Fixes#3800 | https://gitlab.com/kicad/code/kicad/issues/3800
Convert minimum sheet width and height definitions from mils to internal
units.
Add comment to sheet minimum width and height definitions to indicate
sizes are in mils.
This file should really be included first from any source file, because it
contains platform specific workarounds.
This also groups includes a bit by source.
Bus submenus weren't sending events because tool wasn't set.
Net names need to be unescaped for display.
Unfolding wasn't drawing the new wire segments.
SCH_LINE_WIRE_BUS_TOOL could get caught in an infinite event handling loop.
Fixes https://gitlab.com/kicad/code/kicad/issues/3796
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE
Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
Spice lines defining circuit elements are contained in a .subckt ..
.ends block. The intervening lines should be exported to the netlist as
well as the control lines.
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
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.
Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
* 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