Community
Participate
Working Groups
Build Identifier: 3.6 - 3.7 By default org.eclipse.swt.widgets.Tree is expanding/collapsing on double click and sending a SWT.Expand event. If I add an empty SWT.DefaultSelection listener, tree is no more expanding on double click, end no event is sent. It works event in the ControlExpample when adding listener, who writes event to log. Reproducible: Always Steps to Reproduce: 1.Create org.eclipse.swt.widgets.Tree with some items and sub items; 2.Check mouse double click on some item with children to expand/collapse it. 3.Create same tree and add SWT.DefaultSelection to it. 4.Items are no longer expanding/collapsing on mouse double click;
That is the correct behaviour. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=155817#c2 Here is the comment in the code: /* * When the user double clicks on a tree item * or a line beside the item, the window proc * for the tree collapses or expand the branch. * When application code associates an action * with double clicking, then the tree expand * is unexpected and unwanted. The fix is to * avoid the operation by testing to see whether * the mouse was inside a tree item. */ Closing as wont fix.