Pass the current SCHEMATIC object pointer in SCH_SYMBOL ctor so that
newly created symbols will update the current instance data on creation
when the current sheet instance is being displayed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize(). This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.
(cherry picked from commit 898ec0d094)
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.
Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame. This allow
for the cleanup actions onClose() to happen prior to the next action
starting
Fixes https://gitlab.com/kicad/code/kicad/issues/11891
(cherry picked from commit 93fb00d815)
It looks like this was overlooked by Jeff in 2020 not realizing eda_doc isn't built under eeschema but common in cc9ac37a0e
(cherry picked from commit f85251ef75)
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
(cherry picked from commit 21144481d2)
Our heuristics for determining when to append to the undo aren't
sufficient for the two segments of a broken wire. One is new and the
other is changed, but the drag should be appended to the current undo.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10865
When double-clicking to open a symbol, it is no longer selected in the
tree. We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command
Fixes https://gitlab.com/kicad/code/kicad/issues/11034
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus. This increases the maximum popup number (integers are free)
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.
We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
If a wire intersects more than 2 pins from the same symbol, we don't
trim connections. If the wire intersects exactly two pins from a single
symbol, we remove the wire between the pins.
We avoided doing this before because we didn't have a good metric for
trimming vs. not. But the per-symbol calculation feels like the least
surprising option.
Fixes https://gitlab.com/kicad/code/kicad/issues/10909
Fixes https://gitlab.com/kicad/code/kicad/issues/1857
We need the item to be currently selected when repeating the last symbol
insert. This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions
Fixes https://gitlab.com/kicad/code/kicad/issues/10619