After upgrading from KiCad 5.0.1-3 to KiCad 5.1.0-0 for Mac OS X 10.11-10.13 (https://kicad-downloads.s3.cern.ch/osx/stable/kicad-unified-5.1.0.dmg), the displayed grid ignores the User Defined Grid "Size Y" field. When I set different sizes for X and Y, the X value is used for displaying grid dots on both axes, though the actual grid snapping appears to follow the specified settings.
This bug occurs in both Modern Toolset (Accelerated) and Modern Toolset (Fallback), but not in Legacy Toolset. The bug is still present in the 2019-03-22 nightly build (https://kicad-downloads.s3.cern.ch/osx/nightly/kicad-nightly-20190322-014317-68d8f4467.dmg). This occurs in both Pcbnew and Footprint Editor.
Application: kicad
Version: (5.1.0-0), release build
Libraries:
wxWidgets 3.0.4
libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.51.0
Compiler: Clang 8.0.0 with C++ ABI 1002
Build settings:
USE_WX_GRAPHICS_CONTEXT=ON
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
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
The attached patch decouples the X and Y step sizes when drawing the grid. It also cleans up some of the code in the DrawGrid function by fixing some type issues and an unused variable.