Text selection issues in "Text Properties" dialog in eeschema

Bug #1742296 reported by Oliver
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Jon Evans

Bug Description

In the 'text properties' dialog in eeschema, the user cannot select text. The following methods of selection do not work:

1. Drag select of characters
2. Double click on word to select that word
3. Ctrl+A for all words
4. Shift + arrow key to select relative to cursor

Application: kicad
Version: (2018-01-07 revision 445fc0000)-makepkg, release build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.60.0
    Curl: 7.54.1
    Compiler: GCC 7.1.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_SPICE=ON

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

Works fine on OSX with slightly later build:

Application: kicad
Version: (2018-01-09 revision 00fb70088)-master, debug build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.3.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.3 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.65.1
    Curl: 7.57.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

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

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

I don't see this on Linux. Maybe Windows-only?

Application: kicad
Version: (2018-01-09 revision 00fb70088)-master, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.52.1 GnuTLS/3.5.8 zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.9.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    Curl: 7.52.1
    Compiler: GCC 6.3.0 with C++ ABI 1010

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=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=OFF

Revision history for this message
Oliver (schrodingersgat) wrote : Re: [Bug 1742296] Re: Text selection issues in "Text Properties" dialog in eeschema

I think that rich-text controls have some windows-only issues (I have a
vague recollection of running into this before)

On Wed, Jan 10, 2018 at 9:39 AM, Seth Hillbrand <email address hidden>
wrote:

> I don't see this on Linux. Maybe Windows-only?
>
> Application: kicad
> Version: (2018-01-09 revision 00fb70088)-master, release build
> Libraries:
> wxWidgets 3.0.2
> libcurl/7.52.1 GnuTLS/3.5.8 zlib/1.2.8 libidn2/0.16 libpsl/0.17.0
> (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
> Platform: Linux 4.9.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
> Boost: 1.62.0
> Curl: 7.52.1
> Compiler: GCC 6.3.0 with C++ ABI 1010
>
> 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=OFF
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_SPICE=OFF
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1742296
>
> Title:
> Text selection issues in "Text Properties" dialog in eeschema
>
> Status in KiCad:
> New
>
> Bug description:
> In the 'text properties' dialog in eeschema, the user cannot select
> text. The following methods of selection do not work:
>
> 1. Drag select of characters
> 2. Double click on word to select that word
> 3. Ctrl+A for all words
> 4. Shift + arrow key to select relative to cursor
>
>
> Application: kicad
> Version: (2018-01-07 revision 445fc0000)-makepkg, release build
> Libraries:
> wxWidgets 3.0.3
> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0
> nghttp2/1.23.1 librtmp/2.3
> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian,
> wxMSW
> Build Info:
> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.60.0
> Curl: 7.54.1
> Compiler: GCC 7.1.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_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1742296/+subscriptions
>

Seth Hillbrand (sethh)
tags: added: eeschema windows
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I have just tested Text/Label/Field Properties dialogs on Windows 7 and all selection methods seem to work fine. Windows 8 specific issue?

Revision history for this message
Oliver (schrodingersgat) wrote :

I have some further information, which may help you replicate.

I have *only* seen this in the multi-line text item editor in eeschema.

Case 1: Edit a text object which is single-line only

* e.g. press 'e' to edit
* Can highlight / select all text fine, using any regular method
* Input multiple lines of text, highlight still works fine
* Press OK to save with multiple lines of text

Case 2: Edit text item again (now it is multiple lines)

* Cannot highlight / select text
* Edit the text to be only a single line
* Press OK to save

Case 3: Open again, single line of text

* Highlight / select is working again.

Bottom line, it appears that the bug only exhibits when you first open a text-edit window *where the text already has multiple lines*

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

@Oliver, just to clarify further, when you say "multiple lines" do you mean text with a <return> in it, or just text long enough that it wraps into multiple lines?

Note that bug still doesn't reproduce on OSX (given either definition of multiple lines).

Revision history for this message
Oliver (schrodingersgat) wrote :

Text with a return / enter / newline. Not a single long line that has simply wrapped

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

This one is definitely strange. I see this on windows 10 but not windows 7. If I open a multi line text object and hit ctrl+a to select all, the text is not highlighted. However, if I alt-tab to another application and then back to eeschema, the text is now highlighted. It looks like the text control paint event is being blocked somewhere. I don't know if this is an issue with our code, wx, or windows. We might want to check for any event.Skip() calls and remove them to see if that helps.

Changed in kicad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Martin (martin-held) wrote :

I am seeing this on windows 10 (enterprise), with 5.0.0-rc2-dev-g8fcbb64a4. When I highlight text in the text box, the first few (2 or 3) times it works fine, but then on the 3rd or 4th try, I get no highlighting. It is actually highlighting (like, I can drag and select all the text), but the cursor goes away. Hitting delete / etc will replace the text. Makes it very annoying when trying to copy text from the schematic.

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

Bumping the priority as this has now been logged 3 times.

Changed in kicad:
importance: Low → Medium
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Perhaps we could get some extra data points:
- does the problem occur with other multiline text edit controls (e.g. pcbnew)?
- does the problem occur with wxWidgets sample projects (normally available in wxwidgets-src/samples)

Revision history for this message
Art (diametrix) wrote :

@Jeff
>Bumping the priority as this has now been logged 3 times

I think the fact that the tracker of people affected is at 36 could've given you a clue :)

@Maciej

>- does the problem occur with other multiline text edit controls (e.g. pcbnew)?

No

>- does the problem occur with wxWidgets sample projects (normally available in wxwidgets-src/samples)

Not sure where that is

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

This problem does not occur in pcbnew.
I noticed that if you tab to another field then back to the text field, the selection becomes visible.
Looks like an issue with focus (if the focus is not on a field, selection should be invisible).
Dialog initialization is different in
/pcbnew/dialogs/dialog_pcb_text_properties.cpp
and /eeschema/dialogs/dialog_lib_edit_text.cpp
I think making the text field initialize the same way as in pcbnew may resolve the issue.

Jon Evans (craftyjon)
Changed in kicad:
assignee: nobody → Jon Evans (craftyjon)
milestone: none → 5.0.0-rc2
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

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

Ha! After all that it was a one-liner because someone accidentally left wxTE_RICH on. Well done, Jon!

(BTW: did you search to see if there were any other instances of the same? I wonder if we also have it elsewhere….)

> On 25 Mar 2018, at 03:45, KiCad Janitor <email address hidden> wrote:
>
> Fixed in revision bfe9eff87886cce30f739c84a57eab52108aeb85
> https://git.launchpad.net/kicad/patch/?id=bfe9eff87886cce30f739c84a57eab52108aeb85
>
> ** Changed in: kicad
> Status: Triaged => Fix Committed
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1742296
>
> Title:
> Text selection issues in "Text Properties" dialog in eeschema
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> In the 'text properties' dialog in eeschema, the user cannot select
> text. The following methods of selection do not work:
>
> 1. Drag select of characters
> 2. Double click on word to select that word
> 3. Ctrl+A for all words
> 4. Shift + arrow key to select relative to cursor
>
>
> Application: kicad
> Version: (2018-01-07 revision 445fc0000)-makepkg, release build
> Libraries:
> wxWidgets 3.0.3
> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
> Build Info:
> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.60.0
> Curl: 7.54.1
> Compiler: GCC 7.1.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_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1742296/+subscriptions

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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