Allow a horizontal scroll event to fall through to the panning branch.
This still restricts zooming to use only the vertical axis, but it
(re-?)enables the horizontal pan function that currently doesn't work
even if the user has set "allow horizontal panning", as the horizontal
scroll doesn't have a modifier, which is the default for vertical scroll
zoom, and thus it skips over the whole panning branch.
If the user has not set horizontal panning, the earlier early return
means that there is no handling of any horizontal scroll event, so this
won't change anything for these users.
In commit 7cb754dd a call to wxMilliSleep(50) was removed (because it created
lag in editing) but this removal created a 100% CPU core usage.
Using a much small sleep time (1ms) fixes these issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17979
Library watches only need a single directory or immediate children. The
project watcher should have a sensible limit to the total number of
files it tries to track.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.
(cherry picked from commit ddd7c35586)
Co-authored-by: Jon Evans <jon@craftyjon.com>
- Fixes early load during NESTED_SETTINGS construction within
SCHEMATIC_SETTINGS, now failing due to missing migrations at that
object construction point
- Adds missing (NOOP) migration for NET_SETTINGS schema versions 1 -> 2
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.
The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.
The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.
This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.
Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
The "already placed parts" feature causes a situation where many
single-part queries are placed before the cache is even filled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17940
(cherry picked from commit 3c99a3797e)
Co-authored-by: Jon Evans <jon@craftyjon.com>
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
Simplify a little by keeping the positions of A and B in
variables.
Also remove const when returning by value - all that does is
inhibit a (possible, NRVO) move if you assign the result to
a non-const vector.
We need the object in m_locale for a bit more things during program cleanup,
especially on macOS
The destructor of PGM_BASE is sufficient allowance of lifetime.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17369