Skip to contentSkip to conversation

kernel-shark-qt: Fix the broken Color scheme slider

PATCH New Yordan Karadzhov (VMware) 1 participant 1 message Aug 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-shark-qt: Fix the broken Color scheme slider

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 LWN.net. Thanks Jake!

Fixing: 3a50d107e9 ("kernel-shark: Avoid the unnecessary calls of KsGLWidget::loadColors()")

---
 kernel-shark/src/KsMainWindow.cpp | 1 +
 1 file changed, 1 insertion(+)
kernel-shark/src/KsMainWindow.cpp +1 -0
index 6f86b91..6439265 100644
@@ -904,6 +904,7 @@ void KsMainWindow::_record()
 void KsMainWindow::_setColorPhase(int f)
 {
 	KsPlot::Color::setRainbowFrequency(f / 100.);
+	_graph.glPtr()->loadColors();
 	_graph.glPtr()->model()->update();
 }
 
Signature · 1 line
2.20.1