Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2013-03-27 17:38:32 +0000
committerPatrick Tasse2013-05-31 17:10:01 +0000
commita61c1c90e240e392fc3d20b958541f01e819ec13 (patch)
tree012aa57f9c36ae712408cca5e8106b7196fd71dd
parent95173b0defc98aed9f911de7d21bde92e61aebc0 (diff)
downloadorg.eclipse.linuxtools-a61c1c90e240e392fc3d20b958541f01e819ec13.tar.gz
org.eclipse.linuxtools-a61c1c90e240e392fc3d20b958541f01e819ec13.tar.xz
org.eclipse.linuxtools-a61c1c90e240e392fc3d20b958541f01e819ec13.zip
TMF: Fix for subtree expanding sync bug in timegraphcombo
Expanded state of elements in time graph viewer is taken from the value of the expanded state of the tree viewer. Should work for both Linux and Windows Change-Id: I7bb82544e669cf73aafdd81f8993d1b7105a77b7 Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/11527 Tested-by: Hudson CI Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
index 5eec1e566d..7ba43cde66 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
@@ -381,7 +381,12 @@ public class TimeGraphCombo extends Composite {
@Override
public void treeExpanded(TreeExpansionEvent event) {
- fTimeGraphViewer.setExpandedState((ITimeGraphEntry) event.getElement(), true);
+ ITimeGraphEntry entry = (ITimeGraphEntry) event.getElement();
+ fTimeGraphViewer.setExpandedState(entry, true);
+ for (ITimeGraphEntry child : entry.getChildren()) {
+ boolean expanded = fTreeViewer.getExpandedState(child);
+ fTimeGraphViewer.setExpandedState(child, expanded);
+ }
List<TreeItem> treeItems = getVisibleExpandedItems(tree);
if (treeItems.size() == 0) {
return;
@@ -406,7 +411,12 @@ public class TimeGraphCombo extends Composite {
@Override
public void treeExpanded(TimeGraphTreeExpansionEvent event) {
- fTreeViewer.setExpandedState(event.getEntry(), true);
+ ITimeGraphEntry entry = event.getEntry();
+ fTreeViewer.setExpandedState(entry, true);
+ for (ITimeGraphEntry child : entry.getChildren()) {
+ boolean expanded = fTreeViewer.getExpandedState(child);
+ fTimeGraphViewer.setExpandedState(child, expanded);
+ }
}
});

Back to the top