tmf: Fix obsolete checked elements in AbstractSelectTreeViewer/2 AbstractSelectTreeViewer/2 uses a checkbox tree that internally stores its checked elements. When the tree model is updated from the data provider, the element instances can change even if they retain the same model ids. The checkbox tree needs to re-set and update its internal set of checked elements. This happens in contentChanged() which is now only called when the tree input has changed, since https://git.eclipse.org/r/169994. This patch changes AbstractTmfTreeViewer to always call contentChanged() when updating the tree, whether the tree input has changed or not. [Fixed] Fix obsolete checked elements in AbstractSelectTreeViewer/2 Change-Id: I5ec79c12000d7ab8cfcb81c02a77ddb3aa24648b Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/171377 Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java index f314d88..9dc64f6 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractTmfTreeViewer.java
@@ -566,10 +566,10 @@ if (newInput != input) { fTreeViewer.setInput(newInput); - contentChanged(newInput); } else { fTreeViewer.refresh(); } + contentChanged(newInput); /* * Reset Selection