Fix widget detection logic
The transaction editor event filter that detects mouse clicks on widgets
that do not belong to the editor was called by objects that are no
widgets. This caused the filter to trigger which resulted in the dialog
box about leaving the editor popping up even though the actual click was
on an edit widget (e.g. category).
This patch prevents the check for non-widget objects and resolves the
issue.