Y-coordinate inversion when attempting to move a pin

Bug #1840154 reported by Art
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Low
Ian McInerney

Bug Description

When I move a pin the cursor jumps to the opposite Y coordinate. For example if the pin I'm moving is located at Y = 2.00", when I place cursor over the pin and hit "M" keyboard shortcut, the cursor will jump to Y = -2.00. If the pin is located far enough from the 0 coordinate, it gets really confusing because after the jump everything disappears and the only thing you see is the cursor.

Application: KiCad
Version: (5.1.0-1480-g10e4bf2a2), 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:
    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

Tags: eeschema
tags: added: eeschema
Changed in kicad:
status: New → Confirmed
Changed in kicad:
importance: Undecided → Low
milestone: none → 6.0.0-rc1
Jeff Young (jeyjey)
summary: - Symbol Editor - cursor jumps when attempting to move a pin
+ Y-coordinate inversion when attempting to move a pin
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Something else strange (on macOS at least) that I'm not sure if its related:

1) Open symbol in libedit.
2) mouseover a pin, hit M (selects pin for moving).
3) Repeatedly hit M again: this moves the pin in steps away from the origin.

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

I can reproduce the behaviour in comment #1, but not the original bug. Is there a particular symbol or setting I need? (Do you have "Warp mouse to origin on move" on or off?)

Revision history for this message
Ian McInerney (imcinerney) wrote :

@Jeff, are you looking in libedit? It doesn't have the warp mouse to origin option in preferences. When I use libedit I get the inversion of the Y coordinate whenever I try to move a pin or text object.

Also, to add onto the behavior that Michael noted, when you exit the tool after pressing multiple times the pin doesn't return to its original position (it seems the exit position is reset every time M is pressed).

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

@Ian, the setting is (well, was) in Eeschema.

Since it's shared I've just now moved it to Common.

Revision history for this message
Ian McInerney (imcinerney) wrote :

@Jeff, the warp mouse setting doesn't seem to make a difference on the behavior in my build (this is still with it in the Eeschema panel).

Application: KiCad
Version: (5.1.0-1519-g3cdf88f2c), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.65.3 OpenSSL/1.1.1c-fips zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.0/openssl/zlib nghttp2/1.38.0
Platform: Linux 5.1.18-300.fc30.x86_64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.65.3
    Compiler: Clang 8.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF

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

I pushed a fix for the multiple 'E' wander, but I still can't reproduce the other.

Revision history for this message
Ian McInerney (imcinerney) wrote :

@Jeff, this only happens when warping to the reference point. The position stored in the LIB_ITEM isn't actually the position it is at on the screen, instead it is stored with the Y-axis inverted since that is how the library stores it. Everywhere else that interfaces with the position inverts the Y-axis before use.

The attached patch should fix this (and also some formatting issues).

Changed in kicad:
assignee: nobody → Ian McInerney (imcinerney)
Revision history for this message
Jeff Young (jeyjey) wrote :

Yep, I can reproduce it with "Move warps cursor" on.

I've merged your patch. Thanks!

Revision history for this message
Ian McInerney (imcinerney) wrote :

Forgot to put the fixes line in.

Fixed in revision 49dd5d838c0776e8b22f70ad98d66b7876583558
(https://git.launchpad.net/kicad/commit/?id=49dd5d838c0776e8b22f70ad98d66b7876583558)

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