| Summary: | Tree : Selection Lost when collapsing unrelated item on Windows 7 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Priyadarshini <patil273> | ||||
| Component: | SWT | Assignee: | Felipe Heidrich <eclipse.felipe> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | eclipse.felipe, elias, Silenio_Quarti, Stuart.Pond | ||||
| Version: | 4.1 | ||||||
| Target Milestone: | 3.8 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
There is a similar bug Bug 139060 which has been fixed on XP, but this issue is still seen on Windows 7. Our customer's usecase involves making huge list of selections and in the process of making these selections, they will have to collapse the tree to view more of the tree nodes to select from. Because of the loss of selection on collapse on other unrelated tree node, the customer is losing selections without his knowledge. He will have to make those selections again which is causing substantial amount of rework and confusion. Hence raising the priority to critical. Felipe to investigate with SSQ. Related to Bug 151150 Created attachment 198417 [details]
patch
fixed in HEAD |
Build Identifier: 3.5.0 When multiple tree items present under different parent nodes are selected, collapsing a parent causes loss of selection of tree items under another unrelated parent. Reproducible: Always Steps to Reproduce: - Run the snippet below - Multi-select item G, item F and then item D in given order. - Collapse item C by clicking on its [-] box - Expected result: Since item G and item F are not a descendant of item C, they should stay selected - Actual result: Item F is deselected --- Code Snippet --- import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; public class TreeSelectionTest { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("" + SWT.getVersion()); shell.setLayout(new FillLayout()); Tree tree = new Tree(shell, SWT.MULTI); TreeItem itemA = new TreeItem(tree, SWT.NONE); itemA.setText("Item A"); TreeItem itemB = new TreeItem(itemA, SWT.NONE); itemB.setText("Item B"); TreeItem itemC = new TreeItem(itemB, SWT.NONE); itemC.setText("Item C"); TreeItem itemD = new TreeItem(itemC, SWT.NONE); itemD.setText("Item D"); TreeItem itemE = new TreeItem(itemB, SWT.NONE); itemE.setText("Item E"); TreeItem itemF = new TreeItem(itemE, SWT.NONE); itemF.setText("Item F"); TreeItem itemG = new TreeItem(itemE, SWT.NONE); itemG.setText("Item G"); itemA.setExpanded(true); itemB.setExpanded(true); itemC.setExpanded(true); itemE.setExpanded(true); shell.setSize(200, 200); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }