Dialog Ok button

Bug #1599157 reported by Diogo
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Every dialog I came across in kicad, where the "Ok" button appears highlighted won't work if I press enter/return, as it should...

I've attached a photo where the button is highlighted.

To reproduce is simple:

1- Just open any dialog, like edit symbol in eeschema, edit pad/line in pcbnew, etc...
2- Hit enter...
3- Nothing happens.
4- Hitting the button with the mouse, will apply changes (if present) and close the dialog.

This is not a critical bug, but it messes the usability of kicad.

Also the button remains highlighted even if the cursor is active in a field.

This behaviour or lack of it seems to be consistent in the entire application.

Running kicad on:
Mac os x 10.11.5
BZR 6965

P.S. 1
Not even sure if this is a kicad or a wx bug...

P.S. 2
Editing the value of eeschema has the correct behaviour at leas in this version.

Editing the component (E over the component) won't work at first... but if I hit (cmd+tab == alt+tab) to another app and then again to go back to kicad, it will work.

Tags: osx
Revision history for this message
Diogo (diogocondeco) wrote :
description: updated
Diogo (diogocondeco)
description: updated
tags: added: osx
Revision history for this message
Clemens (clemens500) wrote :

how to reproduce:

- open part in library editor
- edit pin
- select/change any value with a dropdown menu
- return/enter does not work (you have to "tab" to the next value without dropdown menu)

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

This is true anytime there is no field in the dialog with focus. Some dialogs (for instance, line properties in pcbnew) don't get focus to start with and so exhibit this problem.

But even for other dialogs, if you click in the dialog but not inside any field you'll also kill enter-to-OK.

When tabbing it also doesn't select the contents of text fields, which I'd say is an even more troublesome bug.

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

Fixed focus and tab-select-all issues. Tabbing still doesn't work in dialogs using a StaticBox, but that's a wxWidgets issue (https://bugs.launchpad.net/kicad/+bug/1740187).

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Jeff, I think it would be good to influde the information you wrote on the mailing list in the commit message.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1599157] Re: Dialog Ok button

@Jeff, this may fix the issue on osx but it doesn't make sense to me
that this needs to be called every time the dialog is repainted
(wxPaintEvent). This seems like a lot of overhead. I will test it on
linux when I get a chance but I would prefer if one of our macos devs
would test this patch before I commit it.

On 12/26/2017 05:49 PM, Jeff Young wrote:
> Fixed focus and tab-select-all issues. Tabbing still doesn't work in
> dialogs using a StaticBox, but that's a wxWidgets issue
> (https://bugs.launchpad.net/kicad/+bug/1740187).
>
> ** Patch added: "0001-Move-the-OSX-dialog-fixups-later-so-they-come-after-.patch"
> https://bugs.launchpad.net/kicad/+bug/1599157/+attachment/5027752/+files/0001-Move-the-OSX-dialog-fixups-later-so-they-come-after-.patch
>

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

@Wayne, note that there is a boolean guard (m_fixupsRun) so that it is only run on the first wxPaintEvent.

(I did try several other solutions, but none of them worked. Not that I'm suggesting there -isn't- a better solution, just that I didn't find one.)

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

@Jeff, I missed the one shot guard. I'll go ahead and merge this if it
doesn't break anything on Windows and Linux.

On 12/28/2017 02:45 PM, Jeff Young wrote:
> @Wayne, note that there is a boolean guard (m_fixupsRun) so that it is
> only run on the first wxPaintEvent.
>
> (I did try several other solutions, but none of them worked. Not that
> I'm suggesting there -isn't- a better solution, just that I didn't find
> one.)
>

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

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

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I tested this patch on windows and linux and I didn't notice any issues
so I went ahead and merged it. If there are any unexpected issues, I
can always revert it later. Hopefully this fixes some of the osx dialog
issues. Thank you for your contribution.

On 12/26/2017 05:49 PM, Jeff Young wrote:
> Fixed focus and tab-select-all issues. Tabbing still doesn't work in
> dialogs using a StaticBox, but that's a wxWidgets issue
> (https://bugs.launchpad.net/kicad/+bug/1740187).
>
> ** Patch added: "0001-Move-the-OSX-dialog-fixups-later-so-they-come-after-.patch"
> https://bugs.launchpad.net/kicad/+bug/1599157/+attachment/5027752/+files/0001-Move-the-OSX-dialog-fixups-later-so-they-come-after-.patch
>

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.