| Summary: | [Tree] Double click does not toggle expanded state | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Nobody - feel free to take it <nobody> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ivan | ||||
| Version: | 1.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 140137 [details]
Patch that solves the bug
One note: If there is a MouseListener attached, the mouseDoubleClick is not fired if you double click on tree item. This is true with useDoubleClick set to false too. Applied patch to CVS HEAD. I think this bug is invalid. SWT does not expand TreeItems on double click, at least not in GTK. IIRC, this was the reason for setting useDoubleClick to false. On Windows it does. Tested with SWT Controls Demo ( SWT 3.5.0 ). Revert the changes as we will respect the GTK behaviour here. If you need to toggle the expanded state you can do it manually in defaultSelection event, triggered on doubleClick. |
Build ID: RAP Steps To Reproduce: 1. Run the snippet 2. Double click on a tree node 3. Nothing will happen Expected: The expanded state toggles on double click. More information: public class TreeDoubleClickBug implements IEntryPoint { public int createUI() { Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Tree tree = new Tree(shell, SWT.NONE); for (int i = 0; i < 3; i++) { TreeItem item = new TreeItem(tree, SWT.NONE); item.setText("item " + i); for (int j = 0; j < 3; j++) { TreeItem child = new TreeItem(item, SWT.NONE); child.setText("child " + i); } } shell.setSize(300, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); return 0; } }