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.
The macros are if/else statements without enclosing structures which
leads to unexpected evaluation when expanding in an existing conditional
that does not have braces already.
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
The modifier keys on the keyboard control the motion spacing (Ctrl) and
shouldn't be confused with the modifier key used to disable grid
snapping when moving with the mouse (also Ctrl)
Fixes https://gitlab.com/kicad/code/kicad/issues/13027
Autoscroll wasn't working on Mac because the status popup's panel
has the focus. This *may* also fix a problem on MSW of the auto-scroll
not being cancel-able.
Fixes https://gitlab.com/kicad/code/kicad/issues/11425
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
On MSW, CaptureMouse() was sometimes called event if the GAL panel has
captured the mouse (that was not accepted by wxMSW), although HasCapture()
returns false.
(Perhaps some race condition between events)
The fix add a flag to avoid calling twice CaptureMouse() after only one
wxEVT_MOUSE_CAPTURE_LOST event was received.
Fixes#8239https://gitlab.com/kicad/code/kicad/issues/8239
Closing the window while dragging with unsaved changes causes a dialog box, triggering a capture-lost event. Closing the window while dragging without unsaved changes causes an assertion about destroying a window with mouse capture.