From a1732428b20a0ac041a1c6b71cbab32773f79464 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Fri, 5 Jun 2026 16:44:03 -0400 Subject: [PATCH] Add fallback in PieChartViewer refresh. If there is a selection chart but not enough event types in the selection, show the global pie chart instead. --- .../internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java index 6cbbfaa5ab..d4c5d39e04 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java @@ -422,8 +422,9 @@ public synchronized void refresh(boolean refreshGlobal, boolean refreshSelection // Check if the selection is empty or if // there is enough event types to show in the piecharts + // if there aren't enough, show the global pie chart if (nbEventsType < 2) { - getCurrentState().newEmptySelection(this); + getCurrentState().newGlobalEntries(this); } else { getCurrentState().newSelection(this); }