Footprint Text Properties dialog doesn't default to "OK" button

Bug #1806124 reported by Evan Shultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
Jeff Young

Bug Description

This is with regards to the Footprint Editor tool.

Most dialogs will have a highlighted button which will be executed when hitting the Enter key. For example, in the Line Segment Properties dialog hitting the Enter key executes the "OK" button of the dialog (this button is highlighted).

However, the Enter key seems to have no effect in the Footprint Text Properties dialog. Probably a simple typo connection the action with the interface.

Application: kicad
Version: (6.0.0-rc1-dev-1288-g59b0f553e), 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 7 (build 7601, Service Pack 1), 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

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

@Devs, I can't reproduce on OSX. Is this MSW-specific?

Revision history for this message
eelik (eelik) wrote :

I can reproduce this in Linux Kubuntu with the board editor by selecting e.g. footprint ref text properties.

Is it possible that the dialog is codewise related to generic text properties dialog? If you put text in the board the dialog doesn't take Enter for OK because it's needed for newline. Could that explain the Enter key handling?

Revision history for this message
John Beard (john-j-beard) wrote :

In Linux, Shift-Enter works for me to accept the text properties dialog. I think it should probably be Shift-Enter (maybe Ctrl-Enter on other platforms) *only* when in the text box, else Enter as normal?

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

While they use the same base dialog, the control for entering text is different. We implement the Shift-Enter CharHook just for the multi-line textbox as wxWidgets should handle it for everything else (and does at least on OSX).

I've changed the code to apply the CharHook everywhere in that dialog. This may (or may not) fix the bugs on GTK and MSW.

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

Fixed in revision 45ee95f5e25ad82585da1b965184400e78f413a3
https://git.launchpad.net/kicad/patch/?id=45ee95f5e25ad82585da1b965184400e78f413a3

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Jeff Young (jeyjey)
Revision history for this message
eelik (eelik) wrote :

Seems to work here.

Application: kicad
Version: (6.0.0-rc1-dev-1292-g45ee95f5e), debug build
Libraries:
    wxWidgets 3.0.3
Platform: Linux 4.13.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    Compiler: GCC 7.2.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_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=OFF
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

Revision history for this message
Evan Shultz (evan-shultz) wrote :

Works for me with the newest nightly. Thanks!

Application: kicad
Version: (6.0.0-rc1-dev-1298-g0bceb69fe), 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 7 (build 7601, Service Pack 1), 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
Evan Shultz (evan-shultz) wrote :

I spoke too soon. Sometimes it works and sometimes it doesn't. I haven't yet figured out a sequence of events to reproduce either condition.

Revision history for this message
Evan Shultz (evan-shultz) wrote :

Now running the following version and I still see this. I haven't found exact STR that works, because every time I open the dialog the Enter key never triggers the "OK" button. I did see it working earlier, but I can't find it working at all now.

Application: kicad
Version: (6.0.0-rc1-dev-1521-g81a0ab4d7), 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 :

No matter what footprint text I edit, the enter key is the OK button with:

Application: kicad
Version: (5.1.0-rc1-5-g7789ec4bf), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.63.0 OpenSSL/1.1.1a (WinSSL) zlib/1.2.11 brotli/1.0.7 libidn2/2.1.0 libpsl/0.20.2 (+libidn2/2.1.0) nghttp2/1.36.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.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.63.0
    Compiler: GCC 7.4.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_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
Evan Shultz (evan-shultz) wrote :

And now I can't find an issue either. The Enter key always asserts the OK button and I can see the OK button highlighted when the dialog is invoked.

I verified I was in the modern toolset and I'm sure I was in it before as well.

Hmm... I will try again later.

Revision history for this message
Evan Shultz (evan-shultz) wrote :

I'm not able to reproduce this in the following version. Perhaps this was fixed earlier or I was confused.

Application: kicad
Version: (5.1.0-rc1-5-g7789ec4bf), 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
Jeff Young (jeyjey) wrote :

There were definitely some of these that got fixed, so I suspect that's the case.

Revision history for this message
Evan Shultz (evan-shultz) wrote :

OK, I may have figured it out. This is consistently working (actually, not working) for me:
1. Hover over some text.
2. Press the 'e' to open the Footprint Text Properties dialog.
3. Double-click the value in the Position Y text box to highlight it.
4. Type in a new value for Position Y.
5. Press Enter key.

The OK button on the dialog is still highlighted but the dialog doesn't close. Is somebody able to reproduce this now?

Application: kicad
Version: (5.1.0-rc1-36-gea84020b1), 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 :

No luck reproducing this using your new steps.

Application: kicad
Version: (5.1.0-rc1-44-ge6a200b09), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1a (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.1.1 libpsl/0.20.2 (+libidn2/2.1.1) nghttp2/1.36.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.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 8.2.1 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
Evan Shultz (evan-shultz) wrote :

Here is a video. After typing "5.2" I'm frantically pressing the Enter buttons but nothing happens. Clicking the OK button works.

Sometimes things seem to work OK and I can't figure out exactly what makes this sometimes break. Maybe you will be able to catch something I'm doing in the video that is a clue?

Changed in kicad:
status: Fix Committed → Incomplete
Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Jeff Young (jeyjey) wrote :

I've put in some more defensive code, as well as fixed a bug where <enter> would OK the dialog even if there was a validation error.

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

Fixed in revision 95bfb733eef9afae4c1519964c6bd2aa88e41709
https://git.launchpad.net/kicad/patch/?id=95bfb733eef9afae4c1519964c6bd2aa88e41709

Changed in kicad:
status: Incomplete → Fix Committed
Revision history for this message
Evan Shultz (evan-shultz) wrote :

@Wayne
@Jeff

Thanks for taking time to look into this. I think I have figured out something important.

When I type in letters, I usually use the number pad at the very right of my US English desktop keyboard. If I push the Enter key there nothing happens using the nightly version posted below, just like the video I attached above. But if I press the Enter key just to the right of the QWERTY keys (above the right Shift key) the OK button in the dialog is asserted. So the behavior of the two Enter keys is different.

To help make this more clear, I've attached an image of a representative keyboard I found on Wikipedia where I circled the working Enter key in green and the non-working one in red.

Could it be that the two Enter keys have different behavior and that both explains my issue and why it wasn't able to be reproduced?

Application: ModEdit
Version: (5.1.0-1584-gc85d1fa00), 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

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.