eeschema: inconsistent behaviour of H/V-hotkey during wire/bus/line-drawing
Description
If the H/V-restricted mode is switched on/off with a hotkey during the drawing of a wire/bus/polyline in eeschema this gives unconsistant behaviour depending on the "direction" of the switch:
- switching from H/V-restricted mode ON-->OFF commits one last point (the last bending point) to the drawed wire/bus/polyline
- switching from H/V-restricted mode OFF-->ON deletes the last committed point from the drawed wire/bus/polyline
affects v6.0 as well as v6.99
Steps to reproduce
- open attached project, open schematic
- locate the numbered arrows, they should help to easy re-draw this instructions
- set grid to 0,1"
- set any hotkey for "toggle H/V-mode". I used Shift+Space to get consistency to board editor
- set H/V-mode on
- start wire/bus/line at this point
- move to point 3 (so that wire bends at arrow2)
- now hit hotkey "H/V mode" to switch H/V off
- observe: wire is fixed at point 2 (which was not fixed until now)
- move wire-end around, click to commit intermediate points (at arrow 4+5)
- move still around to point 6 (no click)
- now hit hotkey "H/V mode" to switch H/V on again
- observe: last commited point (at arrow 5) is deleted
KiCad Version
Application: KiCad (64-bit)
Version: (6.99.0-942-g3129f96686), release build
Libraries:
wxWidgets 3.1.5
FreeType 2.11.1
libcurl/7.78.0-DEV Schannel zlib/1.2.11
Platform: Windows 10 (build 19042), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Feb 15 2022 03:53:16
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.76.0
OCC: 7.6.0
Curl: 7.78.0-DEV
ngspice: 36
Compiler: Visual C++ 1928 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON