Dialogs with grids cannot be cancelled when the grid has focus

Bug #1818056 reported by John Beard on 2019-02-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Low
Seth Hillbrand

Bug Description

This affects dialogs with the grids:

* Configure Paths
* Edit Library Tables (eeschema and pcbnew)

Steps:

1) Open dialog
2) Enter a grid cell editor (double click)
3) Press "Cancel"
4) Nothing happens

This seems similar to 75406e274 (fixes https://bugs.launchpad.net/kicad/+bug/1816636)

Tags: ui Edit Tag help
John Beard (john-j-beard) wrote :

I have done an equivalent fix to 75406e274 here. But is there a way to make the cancel event work properly? The OK event seems to work.

Changed in kicad:
importance: Undecided → Low
status: New → In Progress
description: updated
Wayne Stambaugh (stambaughw) wrote :

@John, your patch appears to resolve the issue so I'm fine with merging it. I'm not sure why the cancel button does not work when a grid cell is being edited. It only happens when wxGrid is in play so my guess would be that wxGrid is intercepting the cancel event but why it would be that way doesn't make sense to me.

Seth Hillbrand (sethh) wrote :

In GRID_TRICKS, we could catch wxEVT_COMMAND_BUTTON_CLICKED from the parent window and maybe exit the grid editor when that happens? (Spitballing here)

Seth Hillbrand (sethh) wrote :

Here's a patch that should address this.

We had set the escape id to allow the 'Esc' key to exit the editor without closing the window. But we need to handle the case where the button is clicked instead as the editor doesn't exit first.

Jeff Young (jeyjey) wrote :

This patch works for me on some other dialogs (Footprint Properties in PCBNew and ModEdit) with the same issue.

KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
assignee: nobody → Seth Hillbrand (sethh)
Seth Hillbrand (sethh) wrote :

John, let me know if you find any issues after this.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers