[PATCH] kernel-shark-qt: Fix the broken Color scheme slider

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

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

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();
 	_graph.glPtr()->model()->update();
 }
 
-- 
2.20.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux