Commit 6dbd06a
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 both Linux
and MacOS, this property is not persisted and therefore stored in a
local variable. But on Linux, a call to getExpanded() still returns the
result from a call to the GTK API.
To harmonize the behavior between the different operating systems,
following changes are done:
1) The call to getExpanded() now always returns the local variable,
similar to how it's done for MacOS.
2) The call to setExpanded() doesn't modify the tree item if it is
already expanded or a leaf node.1 parent 941ff78 commit 6dbd06a
File tree
4 files changed
+15
-8
lines changed- bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets
- tests/org.eclipse.swt.tests
- JUnit Tests/org/eclipse/swt/tests/junit
- META-INF
4 files changed
+15
-8
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
| 538 | + | |
542 | 539 | | |
543 | 540 | | |
544 | 541 | | |
| |||
1226 | 1223 | | |
1227 | 1224 | | |
1228 | 1225 | | |
1229 | | - | |
| 1226 | + | |
| 1227 | + | |
1230 | 1228 | | |
1231 | 1229 | | |
1232 | 1230 | | |
| |||
1237 | 1235 | | |
1238 | 1236 | | |
1239 | 1237 | | |
| 1238 | + | |
1240 | 1239 | | |
1241 | 1240 | | |
1242 | | - | |
1243 | 1241 | | |
1244 | 1242 | | |
1245 | 1243 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
560 | 569 | | |
561 | 570 | | |
562 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments