eclipse / nebula

Nebula Project
https://eclipse.org/nebula
Eclipse Public License 2.0
84 stars 98 forks source link

CDateTime does not notify focusLost #430

Closed mikoeh closed 2 years ago

mikoeh commented 2 years ago

A FocusListener attached to CDateTime is not notified about a focusLost when the focus changes from the CDateTime to a non-VControl widget. Apparently the VTracker.setFocusControl(VControl control) ignores the possibility that control (which is received by VTracker.getVControl(...) in the FocusIn case in the VTracker.filter) may have been a standard SWT widget instead of a VControl-based widget. I assume this bug was introduced in https://github.com/eclipse/nebula/commit/b9129cd66a3cf3fb7380cc4b996e354b95965016. Thus, the fix should especially not re-introduce the old bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=476035.

The attached sample application CDateTimeFocus.zip demonstrates that error. Test steps:

mikoeh commented 2 years ago

Pull Request #431