Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
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
When generating a complex pad, this allows the user to combine with a
rotated pad and explode rotated pads without needing to rotate elements
to 0 orientation first.
Fixes: lp:1808137
* https://bugs.launchpad.net/kicad/+bug/1808137
This removes unused static function in page layout editor, unused
variable in pcb_painter and restors the gcc unitialized fix for
pcbnew's drawing_tool.
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
Set the IS_NEW flags so the POINT_EDITOR doesn't try an poke its head
in, and apply the EE_SELECTION_TOOL hack for mouse clicks leaking
through to the underlying tools.
Fixes: lp:1832911
* https://bugs.launchpad.net/kicad/+bug/1832911
Two issues:
* Unassigned hotkeys were being passed to WX in the menu strings as
"<unassigned>". WX doesn't recognise this, and prints debug each time.
Unassigned hotkeys are no longer rare or naughty, so we shouldn't provoke
debug spew. Suppress by not appending hotkey strings for actions with 0
(i.e. unassigned) hotkey IDs.
* The zone cutout tool uses GR_KB_SHIFT, not MD_SHIFT. This causes
"unknown hotkey" spew from WX.
Mouse capture end is called by some actions such as save board. This
resets the cursor image but doesn't change the current tool. Resetting
the cursor image during action prevents this.
(cherry picked from commit 35e87128f5)
Fixes: lp:1831888
* https://bugs.launchpad.net/kicad/+bug/1831888
When using "Place Text" the crosshair was freezing if cancelled before
placing text.
After the crosshair freezes, the next uses of the "Place Text" or
"Add Dimension" caused the crosshair to jump to the screen location
where the previously the crosshair was frozen.
Cancelling the "Add Dimension" caused the crosshair to jump to the
screen location where the crosshair was when cancelled on the next use
of the "Place Text" or "Add Dimension".
Fixes: lp:1822578
* https://bugs.launchpad.net/kicad/+bug/1822578