Changing grid units in Pcbnew and footprint editor doesn't change units in right click grid menu

Bug #1777519 reported by Fabián Inostroza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Jeff Young

Bug Description

While using the modern canvas if you switch units in Pcbnew or footprint editor then the entries in the right click grid submenu are not updated, so if you switched from inches to mm the menu still shows entries like "Grid: xxx mils (yyy mm)". If you do the same with the legacy canvas it shows "Grid: yyy mm (xxx mils)".

Application: kicad
Version: (5.0.0-rc2-169-g11c248a46), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

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

Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
importance: Undecided → Low
status: New → In Progress
milestone: none → 5.0.0-rc3
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 3c7b91b96a6af522a779cc324d2ae102fc7fad9f
https://git.launchpad.net/kicad/patch/?id=3c7b91b96a6af522a779cc324d2ae102fc7fad9f

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Fabián Inostroza (fabianinostroza) wrote :

Hi Jeff,

I tested the changes and now kicad crashes when I open the right click grid menu and hover over any of the the grid options.

The following message is shown in the console:
../kicad/common/tool/context_menu.cpp(376): assert "m_tool" failed in onMenuEvent().
`trap' para punto de parada/seguimiento

If I undo the changes you commited kicad doesn't crash.

Application: kicad
Version: (5.0.0-rc2-181-gf52763f22), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

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

Revision history for this message
Seth Hillbrand (sethh) wrote :

Jeff- This seems to also cause lp:1777700

Changed in kicad:
status: Fix Committed → Confirmed
Revision history for this message
Jeff Young (jeyjey) wrote :

I've implemented a different fix which while involving more code is architecturally simpler.

I can't reproduce either, though, so if someone could check out both this one a 1777700 that would be great.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 79e0bb08d0d4b0952295dd430866c8d789a693fd
https://git.launchpad.net/kicad/patch/?id=79e0bb08d0d4b0952295dd430866c8d789a693fd

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Fabián Inostroza (fabianinostroza) wrote :

Thanks Jeff, works fine, KiCad doesn't crash now and I'm unable to reproduce lp:1777700

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.