Skip to content

Commit a173242

Browse files
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.
1 parent 580df59 commit a173242

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts

tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/viewers/piecharts/TmfPieChartViewer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,9 @@ public synchronized void refresh(boolean refreshGlobal, boolean refreshSelection
422422

423423
// Check if the selection is empty or if
424424
// there is enough event types to show in the piecharts
425+
// if there aren't enough, show the global pie chart
425426
if (nbEventsType < 2) {
426-
getCurrentState().newEmptySelection(this);
427+
getCurrentState().newGlobalEntries(this);
427428
} else {
428429
getCurrentState().newSelection(this);
429430
}

0 commit comments

Comments
 (0)