tmf: Correct the statistics partial event count
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / statistics / TmfStatisticsView.java
index 3504a44f76dd9aea4fa1371961d124bef1c64ab9..f81d785de1b782789e23b17f8c11ee7e140dac57 100755 (executable)
@@ -164,6 +164,22 @@ public class TmfStatisticsView extends TmfView {
                     fExperiment.endSynch(new TmfEndSynchSignal(0));
                     fRequestData = false;
                 }
+            } else {
+                /*
+                 * If the same experiment is reselected, sends a notification to
+                 * the viewers to make sure they reload correctly their partial
+                 * event count.
+                 */
+                TmfStatisticsViewer statsViewer;
+                for (ITmfViewer viewer : fStatsViewers.getViewers()) {
+                    if (!(viewer instanceof TmfStatisticsViewer)) {
+                        Activator.getDefault().logError("Error - cannot cast viewer to a statistics viewer"); //$NON-NLS-1$
+                        continue;
+                    }
+                    statsViewer = (TmfStatisticsViewer) viewer;
+                    // Will update the partial event count if needed.
+                    statsViewer.sendPartialRequestOnNextUpdate();
+                }
             }
         }
     }
This page took 0.028785 seconds and 5 git commands to generate.