Skip to content

Commit 47b8ec3

Browse files
committed
Make TreeItem.getExpanded consistent across platforms #2834
When the children of a previously expanded TreeItem are removed, the call to getExpanded() should continue to return "true". On Linux and MacOS, this property is not persisted in the native widget and may wrongfully return "false".
1 parent 941ff78 commit 47b8ec3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,8 @@ public void test_getExpanded() {
555555
new TreeItem(treeItem, 0);
556556
treeItem.setExpanded(true);
557557
assertTrue(treeItem.getExpanded());
558+
treeItem.removeAll();
559+
assertTrue(treeItem.getExpanded());
558560
treeItem.setExpanded(false);
559561
assertFalse(treeItem.getExpanded());
560562
}

0 commit comments

Comments
 (0)