kernel-shark-qt: Fix the broken Color scheme slider
diff mbox series

Message ID
State Accepted
Commit 7cd8c53a4adcaf53f4ff824a3f8035f3acbf0f5b
Headers show
  • kernel-shark-qt: Fix the broken Color scheme slider
Related show

Commit Message

Yordan Karadzhov (VMware) Aug. 8, 2019, 8:22 a.m. UTC
A previous commit removed the unnecessary calls of loadColors() in
KsGLWidget::paintGL(), however this has the side effect of making
the Color scheme slider nonfunctional. We have to explicitly reload
the color tables of the GL widget every time when the slider is moved.

The bug was reported by Jake Edge in his article about KernelShark on Thanks Jake!

Reported-by: Jake Edge <>
Fixing: 3a50d107e9 ("kernel-shark: Avoid the unnecessary calls of KsGLWidget::loadColors()")
Signed-off-by: Yordan Karadzhov (VMware) <>
 kernel-shark/src/KsMainWindow.cpp | 1 +
 1 file changed, 1 insertion(+)

diff mbox series

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 6f86b91..6439265 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -904,6 +904,7 @@  void KsMainWindow::_record()
 void KsMainWindow::_setColorPhase(int f)
 	KsPlot::Color::setRainbowFrequency(f / 100.);
+	_graph.glPtr()->loadColors();