DRC window calculates cursor position improperly and does not highlight anything

Bug #1813373 reported by Aleksandr Sh
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Jon Evans

Bug Description

If you right click on a DRC problem and choose any item from the menu, the cursor snaps to the marker. If you do that the second time, it snaps to invalid place.

Also, none of marker nor the selected items get highlighted while the tooltip says "Right click to highlight items".
I think markers should also be highlighted on left click on DRC item.

Application: kicad
Version: (6.0.0-rc1-dev-1583-gb0ab53ac2), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.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=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

Revision history for this message
eelik (eelik) wrote :

"Does not highlight" is actually this bug: https://bugs.launchpad.net/kicad/+bug/1594029

Revision history for this message
Jeff Young (jeyjey) wrote :

The "warp to nowhere" doesn't reproduce on OSX. (The other part which is a duplicate is known to be MSW-specific.)

Is anyone else seeing the warp issue?

Revision history for this message
Aleksandr Sh (dsa-t) wrote :

The location the pointer jumps to seems to be dependent on the position of DRC window.
Still happens in:

Application: kicad
Version: (5.1.0-rc2-38-g4612175da), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.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=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

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I cannot duplicate this on windows no matter how hard I try so the conditions to trigger this may be very specific. @Aleksandr, would it be possible for you to create a screen recording of you triggering this bug so we can see what specifically you are doing?

Changed in kicad:
status: New → Incomplete
Revision history for this message
Aleksandr Sh (dsa-t) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

After watching the video, there are more problems that are linux specific as well.

1) On linux, no context menu is displayed to select which component to highlight on courtyard overlaps.
2) No footprint highlighting occurs when the context menu is displayed to select the footprint on courtyard overlaps.
3) The cursor does not seem to be moved to the appropriate footprint in case #2.
4) The error marker should be highlighted after left clicking the error in the drc dialog.

I don't know if any of the is the expected behavior or actual bugs but I would guess the #1 is a bug.

Changed in kicad:
status: Incomplete → Triaged
importance: Undecided → Low
milestone: none → 5.1.1
Jon Evans (craftyjon)
Changed in kicad:
assignee: nobody → Jon Evans (craftyjon)
Jon Evans (craftyjon)
Changed in kicad:
status: Triaged → In Progress
Revision history for this message
Jon Evans (craftyjon) wrote :

@Wayne please check out the attached patch, it changes the behavior slightly but I think for the better.

There is one more issue not yet fixed by this patch: When you use the right-click menu to select one of the items involved in a DRC marker, the mouse cursor will be warped unexpectedly once the menu is closed. This is a bug in the tool framework that I'm looking in to separately.

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

@Jon- Why do you remove itemToggle from the selectPoint() routine?

Revision history for this message
Jon Evans (craftyjon) wrote :

It's moved into doSelectionMenu() for that case (where there is more than one item in the collector and so the menu needs to be shown) -- that way, when other callers like the DRC dialog call right in to doSelectionMenu instead of selectPoint, the selection action will actually happen.

Revision history for this message
Jon Evans (craftyjon) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Jon, this patch looks good to me so go ahead an push it to master when you get a chance. Thanks!

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Jon, please add the bug fix information to commit message so that the janitor can clean up the bug report.

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

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

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Aleksandr Sh (dsa-t) wrote :

I was surprised that hovering over context menu items on linux highlights the objects in green, while on windows it does not. Is it not possible to make on windows?

The cursor still wraps to invalid place. Now the first wrap is also incorrect. I don't see a separate bug report for that, so this should be open.

Application: kicad
Version: (5.1.0-245-gdae41b746), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.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=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

Changed in kicad:
status: Fix Committed → Confirmed
Revision history for this message
Jon Evans (craftyjon) wrote :

The cursor warp needs to be moved to a separate issue because it's due to a problem that extends beyond the DRC window; I will open a new one for it.

Highlighting objects in Windows is not currently possible, see https://bugs.launchpad.net/kicad/+bug/1594029

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Jon Evans (craftyjon) wrote :
Revision history for this message
eelik (eelik) wrote :

@Aleksandr: As I told above, "does not highlight" is actually this bug: https://bugs.launchpad.net/kicad/+bug/1594029

Changed in kicad:
status: Fix Committed → Fix Released
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: Fix Released → Fix Committed
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.