Updating the model before creating new graphs guaranties that all previously plotted graphs are wiped out. Signed-off-by: Yordan Karadzhov <ykaradzhov@xxxxxxxxxx> --- kernel-shark-qt/src/KsGLWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel-shark-qt/src/KsGLWidget.cpp b/kernel-shark-qt/src/KsGLWidget.cpp index 2a0b16b..92b9224 100644 --- a/kernel-shark-qt/src/KsGLWidget.cpp +++ b/kernel-shark-qt/src/KsGLWidget.cpp @@ -484,6 +484,8 @@ void KsGLWidget::_makeGraphs(QVector<int> cpuList, QVector<int> taskList) _graphs.append(graph); }; + _model.update(); + /* Create CPU graphs according to the cpuList. */ for (auto const &cpu: cpuList) lamAddGraph(_newCPUGraph(cpu)); -- 2.17.1