The INT_MAX limit for most elements makes sense only for single-segment,
straight line elements. For elements that accumulate lengths, we should
utilize the long long int (64 bits) to allow for greater lengths.
Fixes: lp:1842367
* https://bugs.launchpad.net/kicad/+bug/1842367
This modifies that logic for optimizing pad connections.
1) Custom pads now prefer the connections to their longer side. This is
particularly important to match the behavior in a rectangular pad
2) Costs for straight lines are non-zero. This favors fewer connections
3) Custom pad breakouts are at the polygon boundary rather than offset
by 0.1mm. This also matches the circular and rectangular paradigm.
4) Line Heads contained in the pad itself are not optimized. This
prevents escaping the pad unnecessarily
Fixes: lp:1824182
* https://bugs.launchpad.net/kicad/+bug/1824182
If the layer is not shown, we should not be allowing it's items to be
selected and chosen as the start/end items in the router.
(cherry picked from commit fc1fb7a590)
Drag is used for multiple modes so should be initialized when starting.
The line that we generate however needs to be pristine in drag, so we
clear the links in the duplicate.
Fixes: lp:1839612
* https://bugs.launchpad.net/kicad/+bug/1839612
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly. wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do. (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)
I played around with a couple of ways to fix wxEVT_CHAR_HOOK. Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.
So I’m changing it so that most tools now skip at the end of their
event loops. I left out a couple that I felt were high risk (length
tuning, for instance). But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.
Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
This sets the clearance outline to a slightly better opacity to allow
viewing of items behind the routed track clearance. Future work should
include making this a configuration option.
Fixes: lp:1826719
* https://bugs.launchpad.net/kicad/+bug/1826719
(cherry picked from commit e0589d2908)
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.
Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
* Circular gal<->common dependency bites again. Add 'common'
again to the 'kicad' target's link libraries. libgal.a depends
on SHAPE_POLY_SET in common, but common depends on gal. This is
not a real fix, but it unsticks Linux compilations. Fixing the
circular dep is an existing bug: https://bugs.launchpad.net/kicad/+bug/1832229
* Missing LEGACY_HK_NAME for ACT_EndTuning: this was probably accidentally
allowed on some other platform due to different wxString constructors.
On Linux/GCC, it breaks.
* Unused include from /kicad in export_vrml.cpp. This is not findable
on Linux, as pcbnew does not include the right dirs for this to be
found. But it's not used, so just remove it.
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)