EDA_ITEM is a child of VIEW_ITEM, so a static_cast is not appropriate,
since in some cases it could be called with a non-EDA_ITEM argument.
This was triggering an ASAN heap-buffer-overflow in GerbView.
This way, when the user changes their color theme, any sheets
that did not have a specific color set will change with the theme.
Also add a button to clear color overrides from a sheet, because
any schematics that have been saved before this change will have
the colors set to something other than UNSPECIFIED.
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.
Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).
Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.
Remove obsolete HIGHLIGHT infrastructure (we now use selection).
Remove extraneous use of BUSY flag in several places (it was never
set).
Add missing plot and print changes for the new bus entry properties.
ADDED: Junction properties diameter and color can now be edited.
Fixes: https://gitlab.com/kicad/code/kicad/issues/4593
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.
Also fixes a bug where a bunch of eeschema settings weren't getting
loaded because it looked like they were larger than the max value
(which wasn't being scaled from mils to internal units).
Fixes https://gitlab.com/kicad/code/kicad/issues/2089
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
Don't try to use complex algorithms taking into account default
margins, line-widths and pen-widths (especially when they differed
between label types). We now use the (user-controlled) text
offset ratio to determine the margins (from the center-point of
the attached line).
Some graphic line thickness were initialized to 0.
The actual line thickness is set after reading config.
But in some cases the config does not exist, and 0 line thickness creates draw issues.
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 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
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)
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).
It served us (mostly) well for more than a decade. It helped KiCad grow
before the std:: came into decent shape or speed. It was a good little
list.
RIP DLIST 2008-2020
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.
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
ADDED new option to set selection highlight thickness.
Also change selection shadow width constants to
make the selection thickness change less drastically
with the zoom level.
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.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting. (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)
Note also that this is more about engineering nomenclature than
visual formatting. In that respect it's more similar to overbar
than italic or bold.
* Fix not drawn shapes for clock low, inverted clock and broken shape for falling edge clock
* Especially, shape for falling edge clock was a not existing shape, therefore useless.
* now falling edge clock and clock low shape are similar.
Fixes: lp:1846901
https://bugs.launchpad.net/kicad/+bug/1846901
The highlight color chosen from the system highlight doesn't always show
against the schematic sheet background color. Allowing the user to
customize with their KiCad theme makes it configurable on par with other
colors. This is stop-gap until we get full color schemes from
lp:1678345
1) Add highlighting to simProbe and simTune tools.
2) Probe tool should accept wires and pins, not wires and components.
3) Give simulator window a flat look to match rest of Kicad.
4) Collapse whitespace out of simulator window.
5) Add some error messages.
6) Add some whitespace to simulation setting dialog.
While we do not generate these arcs internally, some external tools
generate arcs that are technically valid but display correctly only
because of an oddity in the degeneracy mapping.
Fixes: lp:1838557
* https://bugs.launchpad.net/kicad/+bug/1838557
(cherry picked from commit cf949609b2)
Images have a scale factor and this factor was taken in account twice
For image having a scale factor not equal to 1.0, the bounding box was too big (or too small)
1) Use PenWidth() (which is clipped at 0) instead of Width()
2) Implement an interior HitTest when a PolyLine is filled
3) Brighten background objects as well as foreground
4) Don't HitTest last segment when PolyLine is not filled
Fixes: lp:1834703
* https://bugs.launchpad.net/kicad/+bug/1834703
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
While modifying elements in eeschema/libedit, they are overdrawn on the
rest of the schematic. This prevents alignment with existing elements
as the underlying elements are not visible. We set a slight
transparency on elements while being modified to allow the user to view
existing elements at the same time.
Fixes: lp:1817233
* https://bugs.launchpad.net/kicad/+bug/1817233
In particular, don't move block back to start when duplicating,
and don't move crosshair back to start when doing a cut, copy, or
paste.
Also fixes undo for libEdit block duplicate.
Fixes: lp:1740138
* https://bugs.launchpad.net/kicad/+bug/1740138
Block rotate and mirror now work like they do in Pcbnew (that is
they're treated as part of the block move/duplicate/whatever
rather than finishing it).
Fixes: lp:1780794
* https://bugs.launchpad.net/kicad/+bug/1780794
1) when duplicating don’t keep original hidden until end of drag
2) reset selectionArea when showing it so it doesn’t flash in its previous location
3) center a pasted block on the cursor
4) don’t draw the source selectionArea when pasting a block
5) implement selection-style highlighting for contents of blocks
6) add pasted items to view so they don’t disappear when the block is placed
Fixes: lp:1747197
* https://bugs.launchpad.net/kicad/+bug/1747197
Support all symbol orientations. (Yes, SCH_COMPONENT said only the
first 8 were used, but it lied.)
Fix cases where SetTextAttributes() was overwriting previously-
set justifications.
Correct rotation of vertical text.
Fix issue where bold global label would affect thickness of next
label's outline.
Eeschema (where only the parent component is in the view) uses
draw order.
LibEdit (where the individual items are in the view) uses the
viewPriority setting.