kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

'Delete' in editor sometimes deletes widget when one would expect to only affect a property #486

Closed kasemir closed 5 years ago

kasemir commented 5 years ago

Depending on what part of the UI has the focus, the display editor can get into a state where user intends to delete part of a property's string value, but that deletes the widget.

kasemir commented 5 years ago

Reason is in EditorGUI taking focus when mouse enters.

This was meant to simplify copy/paste between two windows: Copy widgets in first window, move mouse into other window, Ctrl-P. The side effect, however, is that this breaks the natural focus handling: Use edits some property, for example a Label's text. Mouse moves by accident out and back into the window -> Focus now on 'layout', and that means the next Delete or Backspace meant to edit the text will instead delete the widget.

By not fetching the focus, accidental widget deletes are avoided. .. but now need to get focus into target window for 'paste' by selecting some widget in there.