Matthew Skala opened issue #5311: Crosshairs button cannot turn crosshairs on and off at KiCad / KiCad Source Code / kicad

Matthew Skala
2020-08-22T13:48:27Z

Description

In recent versions (probably ever since 3D acceleration, and it may depend on the "toolset") the crosshairs button in eeschema and pcbnew toggles between large and small crosshairs, if crosshairs are visible, but it cannot make them visible when they're not, nor make them disappear when they are visible. Visibility of crosshairs is only partially controllable at all, and that only by means of a buried configuration setting.

It appears to be dependent on the mode or tool selected: the arrow/selection tool shows crosshairs if and only if the "Always show crosshairs" preference is active, and in other modes, crosshairs are always shown regardless of this setting. When crosshairs are not shown, the crosshairs button in the left-hand toolbar clicks on and off with no visible effect.

At one time, the crosshairs button would cycle between three states: large crosshairs, small crosshairs, and no crosshairs. That's how it ought to work. In order to be useful, this setting should be controllable from the main UI with the existing button instead of requiring a trip into the preferences. The state of this setting should be retained through mode switches (i.e. when switching between the arrow tool and the other tools) and it should never be the case that clicking the button has no effect.

Lack of crosshairs in the arrow tool is especially annoying in combination with features like DRC and "cross-probing" that cause a window to jump to a specific component or net. If there are no crosshairs, the user is left guessing where the highlighted location actually is - it's just somewhere in the middle of the window. Crosshairs are also useful in the arrow tool for common tasks like measuring coordinates of objects on a board. But it's not desirable to really have them turned on all the time, because they can get in the way during tasks like component placement. Letting the user control it with a button in the main UI to turn the crosshairs on and off easily in all tools/modes was the right way to handle this.

Steps to reproduce

Open eeschema or pcbnew. The arrow tool will be default.

Click the crosshairs button a few times.

Depending on the preferences settings, there may be no effect (crosshairs remain invisible) or the crosshairs may switch between large and small, but it won't switch between crosshairs visible and crosshairs not visible.

KiCad Version

Application: Pcbnew
Version: 5.1.6, release build
Libraries:
wxWidgets 3.0.2
libcurl/7.70.0 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.40.0
Platform: Linux 4.19.59 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.72.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.70.0
Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Version info is what I'm currently running, but problem exists in a recent checkout of 5.99 as well, and it's present in both eeschema and pcbnew.