Opened 9 years ago

Closed 9 years ago

#400 closed defect (fixed)

Pressing enter in volume viewer level entry causes command-line execution

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: major Milestone:
Component: Window Toolkit Version:
Keywords: Cc: pett@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Pressing the enter key while clicked into the volume viewer panel level entry field causes the level to be updated, but also behaves as if enter is pressed in the command-line causing any command in the command-line to be reexecuted.

Change History (1)

comment:1 by Tom Goddard, 9 years ago

Resolution: fixed
Status: newclosed

False alarm. This was caused by test code where I had ui/gui.py MainWIndow keyPressEvent forwarding keys to the command-line. Pressing Enter in the volume level entry field is detected by the volume panel using a returnPressed signal, but the key stroke is also passed to parent widgets. This is probably so Enter could trigger a default button (e.g. "Ok" button) in a dialog. Didn't see a way to suppress dispatching the Enter key event. Took out code that forwards key press events from MainWindow.

Note: See TracTickets for help on using tickets.